Skip to content

Instantly share code, notes, and snippets.

@ngw
Created May 18, 2011 21:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ngw/9a1ca5095392fb083f05 to your computer and use it in GitHub Desktop.
Save ngw/9a1ca5095392fb083f05 to your computer and use it in GitHub Desktop.
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name "~^(.+)\.stylej\.am$";
access_log /var/log/nginx/stylejam-star.access.log;
set $subdomain $1;
try_files $uri $uri/index.html;
rewrite ^(.*)$ /$subdomain$request_uri?;
location / {
proxy_pass http://portfolios.stylej.am;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment