Skip to content

Instantly share code, notes, and snippets.

@gnurag
Created March 9, 2017 11:54
Show Gist options
  • Save gnurag/2b839d299e7781b16db1fce9e42be976 to your computer and use it in GitHub Desktop.
Save gnurag/2b839d299e7781b16db1fce9e42be976 to your computer and use it in GitHub Desktop.
Nginx VirtualHost template
### VirtualHost config file for www.SITENAME.com
#upstream SITENAME_production {
# server 127.0.0.1:4200;
#}
server {
listen 80;
server_name www.SITENAME.com;
access_log /var/log/nginx/SITENAME.com/www_access.log;
root /home/USERNAME/wwwroot/SITENAME;
index index.php index.html index.htm;
include gzip_conf;
# proxy directives
# proxy_set_header X-Real-IP $remote_addr;
# proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# proxy_set_header Host $http_host;
#
# set arbitrary headers
# add_header X-UA-Compatible 'IE=EmulateIE7'; # Request IE8 to fallback to IE7 rendering.
#
# location / {
# proxy_pass http://SITENAME_production;
# }
#
# rewrites for wordpress
# if (!-e $request_filename) {
# rewrite ^(.+)$ /index.php?q=$1 last;
# }
#
# location ~* \.php$ {
# include php_fastcgi;
# }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment