Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hello,
I am completely new to nginx, therefore please be kind. I have my domain registered and I am trying to get the following to happen.
When a user enters example.com I want them to get a 404. When they enter in example.com/test I want them to get my index.html. This is an unusual use case, but its what I would like.
I have set-up a site under
/var/www/example/public_html // /with index.html as well /var/www/example/public_html/test //with index.html as well
The config is located under:
/etc/nginx/sites-available/example
The symbolic link is working and is: /etc/nginx/sites-enabled/example
Heres my config for example:
server
{
listen 80;
server_name example;
#not sure if i need the below to lines?
root /var/www/example/public_html;
index index.html index.htm;
location /
{
return 404;
}
location /test/
{
root /var/www/example/public_html/test;
index index.html index.htm;
}
}
When I enter example.com, I do get my 404. But when I go to example.com/test I just get a 404 as well, when I was hoping the /test/ would be matching and change the root so the index would show.
If I get rid of the two location checks, then typing www.example.com goes to my index.html page as expected.
Any help would be appreciated.
Thank you.
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e
markatango
gouskova