Created
July 7, 2010 15:35
-
-
Save ELLIOTTCABLE/466841 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| user http; | |
| worker_processes 3; | |
| #error_log logs/error.log; | |
| #error_log logs/error.log notice; | |
| #error_log logs/error.log info; | |
| #pid logs/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| include mime.types; | |
| default_type application/octet-stream; | |
| #log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
| # '$status $body_bytes_sent "$http_referer" ' | |
| # '"$http_user_agent" "$http_x_forwarded_for"'; | |
| #access_log logs/access.log main; | |
| sendfile on; | |
| tcp_nopush on; | |
| tcp_nodelay off; | |
| #keepalive_timeout 0; | |
| keepalive_timeout 65; | |
| gzip on; | |
| gzip_http_version 1.1; | |
| gzip_comp_level 2; | |
| gzip_proxied any; | |
| gzip_types text/plain | |
| # text/html | |
| application/xhtml+xml | |
| text/css | |
| text/javascript | |
| application/javascript | |
| application/xml+rss | |
| image/svg+xml | |
| text/xml | |
| application/xml; | |
| client_max_body_size 50M; | |
| add_header X-Awesome-Doggie Tucker; | |
| index index.xhtml index.html index.txt; | |
| server { # Default | |
| server_name _; | |
| include includes.conf; | |
| root /srv/http/nginx; | |
| } | |
| server { # yreality.net | |
| server_name .yreality.net yreality.org; | |
| include canonical_hostname.conf; | |
| include includes.conf; | |
| root /srv/http/sites/yreality.net; | |
| } | |
| upstream taupe { | |
| server 127.0.0.1:21020; | |
| } | |
| server { # tau.pe | |
| server_name .tau.pe; | |
| include includes.conf; | |
| root /srv/http/sites/tau.pe; | |
| location / { | |
| # If the file exists as a static file, serve it directly, and break out. | |
| try_files $uri $uri/ @proxy; | |
| } | |
| location @proxy { | |
| 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_redirect off; | |
| proxy_max_temp_file_size 0; | |
| # Else, we know it's dynamic, let the app deal with it | |
| proxy_pass http://taupe; | |
| } | |
| } | |
| server { # elliottcable.name | |
| server_name .elliottcable.name elliottcable.com; | |
| include includes.conf; | |
| root /srv/http/sites/$host; | |
| if (!-d /srv/http/sites/$host) { break; } | |
| include canonical_hostname.conf; | |
| } | |
| server { # doesthissayno.com | |
| server_name .doesthissayno.com; | |
| include includes.conf; | |
| root /srv/http/sites/doesthissayno.com; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment