This is turning into a larger set of changes... opinions welcome
-- Michael Lustfield
diff --git a/debian/conf/sites-available/default b/debian/conf/sites-available/default index 79e41e8..d6d0d7b 100644 --- a/debian/conf/sites-available/default +++ b/debian/conf/sites-available/default @@ -35,41 +35,50 @@ server { root /var/www/html; - # Add index.php to the list if you are using PHP index index.html index.htm index.nginx-debian.html; server_name _; location / { - # First attempt to serve request as file, then - # as directory, then fall back to displaying a 404. + # This will first try to serve the static file requested. If this + # is not found, then see if the path is a directory. If it is a + # directory, check for the existance of index files in the order + # presented by the index directive and serve if a matche is found. + # The last parameter is a fallback and must always exist. This + # example will return a 404 respones if no files are found. + # + # This represents the default try_files directive: try_files $uri $uri/ =404; } - # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 + # Pass the PHP scripts to a FastCGI application server + # in some cases, "index.php" should be added to the (above) index directive # #location ~ \.php$ { # include snippets/fastcgi-php.conf; - # - # # With php5-cgi alone: - # fastcgi_pass 127.0.0.1:9000; - # # With php5-fpm: - # fastcgi_pass unix:/var/run/php5-fpm.sock; + # # If using php-fpm, this is the default socket location. If you have + # # a different version of php-fpm installed, this may be different. + # fastcgi_pass unix:/var/run/php7.0-fpm.sock #} - # deny access to .htaccess files, if Apache's document root - # concurs with nginx's one + # If your web application was designed to be run on apache, it likely + # has .htaccess and possibly a .htpasswd file embedded. It is typically + # recommended to remove access to these files. # - #location ~ /\.ht { - # deny all; - #} + # If you are using apache as your application server, we strongly + # recommend looking into uwsgi as an alternative. + # + location ~ /\.ht { + deny all; + } } # Virtual Host configuration for example.com # -# You can move that to a different file under sites-available/ and symlink that -# to sites-enabled/ to enable it. +# You can create files underneath the sites-available/ directory and symlink to +# them from sites-enabled/. Once nginx has been reloaded, the changes will take +# effect. (service nginx reload) # #server { # listen 80; @@ -81,6 +90,6 @@ server { # index index.html; # # location / { -# try_files $uri $uri/ =404; +# try_files $uri =404; # } #}