Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

How to Access 2 diffrent html page using NGINX web server

$
0
0
Hi Team,

I am new to Nginx web server and i have a 2 diffrent html page in my html folder namely index.html and index2.html.

how can i access both HTML using Nginx.

I have configured listening port as 8060. and if i try to access http://localhost:8060 then it redirects to index.html. same way if i access http://localhost:8060\index2.html then its not referring index2.html instead its referring index.html.

nginx.conf done as below

location / {
root html;
index index.html index.htm;
allow 192.168.10.65;
allow 192.168.10.75;
deny all;
}
location /html2 {
root html2;
index index2.html index2.htm;
allow 192.168.10.65;
allow 192.168.10.75;
deny all;
}

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>