I want to build and test my website on my Arch Linux computer.
The contents of the website, including index.html
, are in /srv/http/myproject/
.
/etc/nginx/sites-available/myproject.conf
looks like this...
server {
listen 80;
listen [::]:80;
root /srv/http/myproject;
index index.html index.htm;
server_name myproject.local;
location / {
try_files $uri $uri/ =404;
}
}
UPDATE: I had already ran ln -s /etc/nginx/sites-available/myproject.conf /etc/nginx/sites-enabled/myproject.conf
.
And /etc/hosts
has this...
127.0.0.1 myproject.local
But when I navigate to http://myproject.local/
, all I see is the "Welcome to nginx" page.