Created
June 3, 2013 10:26
-
-
Save kyledrake/5697330 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
root /home/web/neocities-web/public; | |
server_name neocities.org www.neocities.org; | |
# location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ { | |
# expires 60s; | |
# log_not_found off; | |
# } | |
try_files $uri @neocities; | |
location @neocities { | |
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; | |
proxy_max_temp_file_size 0; | |
proxy_pass http://127.0.0.1:20000; | |
break; | |
} | |
} | |
server { | |
server_name ~^(?<subdomain>.+)\.neocities.org$; | |
root /home/web/neocities-web/public/sites/$subdomain; | |
index /index.html; | |
error_page 404 = /not_found.html; | |
location ~* \.(html|jpg|jpeg|png|gif|ico|css|js)$ { | |
expires 20s; | |
log_not_found off; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment