Reputation: 3107
I am new to nginx server. I want to load same name file from folder. Suppose:
I have file system as:
folder/xyz/xyz.html
I am want to access xyz.html file using this url: http://localhost:84/xyz using nginx server. I have created the configuration like as:
server {
rewrite_log on;
listen :84;
server_name localhost;
root folder;
location / {
try_files $uri $uri/index.html /index.html;
}
}
With this configuration I am successfully accessible the folder/xyz/index.html file. But I want to access folder/xyz/xyz.html file.
NOTE: name ("xyz") will be dynamically.
Can any please help me.
Upvotes: 1
Views: 391