Skip to content

Instantly share code, notes, and snippets.

@sholloway
Created February 17, 2013 14:37
Show Gist options
  • Save sholloway/4971740 to your computer and use it in GitHub Desktop.
Save sholloway/4971740 to your computer and use it in GitHub Desktop.
An example of how to set up an nginx virtual host.
server {
listen 80;
server_name www.domain1.com;
rewrite ^/(.*) http://domain1.com/$1 permanent;
}
server {
listen 80;
server_name domain1.com;
access_log /home/demo/public_html/domain1.com/log/access.log;
error_log /home/demo/public_html/domain1.com/log/error.log;
location / {
root /home/demo/public_html/domain1.com/public/;
index index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment