diff --git a/nginx.conf b/nginx.conf index 61dd4de..2d14b2f 100644 --- a/nginx.conf +++ b/nginx.conf @@ -1,26 +1,11 @@ -worker_processes 4; +server { + listen 80 default_server; -events { - worker_connections 1024; -} - -http { - server { - listen 80; - server_name YOUR_SERVER_NAME; - charset utf-8; - root /usr/share/nginx/html; - index index.html; + root /usr/share/nginx/html; - #Always serve index.html for any request - location / { - try_files $uri /index.html; - include /etc/nginx/mime.types; <- this fixed my problem with css being read as `text/plain` mimetype - } - error_log /var/log/nginx/client-error.log; - access_log /var/log/nginx/client-access.log; + index index.html; - server_tokens off; - add_header X-Content-Type-Options nosniff; - } -} \ No newline at end of file + location / { + try_files $uri /index.html =404; + } +}