This is my boilerplate for a Nginx config with SSL. I like the idea of modular includes, so I created a /etc/nginx/includes
directory for files that get included into the main config file /etc/nginx/nginx.conf
. I moved mime.types
and fastcgi.conf
to that includes
folder. I use a common-location-rules.conf
file for location rules that are shared between all sites hosted on the server. Relative paths in include
directives are relative to the config prefix path (path to the nginx.conf
file, by default /etc/nginx/
).
The following files are from h5bp/server-configs-nginx:
includes/mime.types
: here the correct MIME type for javascript (application/javascript
instead oftext/javascript
) is set among others. Using this file is important because thegzip_types
rule is set accordingly ingzip.conf
.- **[
includes/expires.conf
](htt