I have a website laike9m.com, which is served by Nginx. I want to access a text file AAA.txt
with url laike9m.com/AAA.txt
. The text file is on my server, let's say it's $HOME/AAA.txt
. Redirection is not allowed. Current Nginx conf file is here. Thank you.
location ~ ^(.*\.txt)$ {
alias /home/laike9m/$1;
}
Solved it.