nginx.conf
server {
# nginx needs Host header in order to process the request. If its value does not
# match any server name, or the request does not contain this header field at all,
# then nginx will route the request to the default server for this port
listen 80 default_server;
listen [::]:80 default_server ipv6only=no;
root /usr/share/nginx/html;
index index.html index.htm;
# Configure name-based virtual hosting
# This allows multiple domains to be served from a single IP address
# Make site accessible from http://localhost/
# Finally, if you set server_name to the empty quote set (”“), nginx will process all
# requests that either do not have a hostname, or that have an unspecified
# hostname, such as requests for the IP address itself.
server_name localhost localhost.localdomain;
location / {
# First attempt to serve request as file, then as directory, then fall back
# to displaying a 404.
try_files $uri $uri/ =404;
}