Quantcast
Channel: Nginx Forum
Viewing all articles
Browse latest Browse all 53287

newbie needs help

$
0
0
Hi,
new in ths nginx, with following config, I want to achieve:

http://sample.com/ render index.html
http://sample.com/test, or anything after '/' path, render index.html

server {
listen 80;
server_name sample.com ;
root /var/www/sample/public_html;

location / {
index index.html index.htm;
}

location ~ ^/.* {
index index.html;
}


}

but when I do this, and got 404 error, anything missing here? Thanks Angelo

curl -I http://sample.com/test

HTTP/1.1 404 Not Found

Viewing all articles
Browse latest Browse all 53287

Trending Articles



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