Skip to content

Instantly share code, notes, and snippets.

@ngw
Created May 18, 2011
Embed
What would you like to do?
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