Created
December 1, 2014 21:21
-
-
Save rootedsoftware/9552ecdc8107334fc55d to your computer and use it in GitHub Desktop.
sites.conf
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
# Upstreams | |
# Note: if you want to run multiple meteor apps on the same server, | |
# make sure you define a separate port for each. | |
#setup meteor upstream servers | |
upstream trashmountainGive { | |
server 127.0.0.1:58080; | |
} | |
upstream trashmountainGiveDev { | |
server 127.0.0.1:58280; | |
} | |
# HTTP redirect for www | |
server { | |
listen 80; | |
server_name www.trashmountain.com; | |
return 301 http://trashmountain.com; | |
} | |
# HTTP listening | |
server { | |
listen 80 default_server; | |
listen [::]:80 default_server ipv6only=on; | |
root /var/www/html; | |
index index.php index.html index.htm ; | |
server_name trashmountain.com trashmountain; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
error_page 404 /404.html; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
location ~* ^/wp-content/uploads/.*\.php$ { | |
return 403; | |
} | |
location ~* ^/system/wp-content/uploads/.*\.php$ { | |
return 403; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_connect_timeout 60; | |
fastcgi_send_timeout 180; | |
fastcgi_read_timeout 180; | |
fastcgi_buffer_size 512k; | |
fastcgi_buffers 512 16k; | |
fastcgi_busy_buffers_size 512k; | |
fastcgi_temp_file_write_size 512k; | |
fastcgi_intercept_errors on; | |
} | |
location /give { | |
return 301 https://trashmountain.com$request_uri; | |
} | |
location /givedev { | |
return 301 https://trashmountain.com$request_uri; | |
} | |
} | |
# HTTPS Server | |
server { | |
listen 443 ssl; | |
ssl_certificate /etc/nginx/ssl/trashmountain.com.chained.crt; | |
ssl_certificate_key /etc/nginx/ssl/nginx.key; | |
error_log /var/log/nginx/trashmountain.error.log crit; | |
root /var/www/html; | |
index index.php index.html index.htm ; | |
server_name trashmountain.com; | |
location / { | |
try_files $uri $uri/ /index.php?q=$uri&$args; | |
} | |
error_page 404 /404.html; | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
location ~* ^/wp-content/uploads/.*\.php$ { | |
return 403; | |
} | |
location ~* ^/system/wp-content/uploads/.*\.php$ { | |
return 403; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_connect_timeout 60; | |
fastcgi_send_timeout 180; | |
fastcgi_read_timeout 180; | |
fastcgi_buffer_size 512k; | |
fastcgi_buffers 512 16k; | |
fastcgi_busy_buffers_size 512k; | |
fastcgi_temp_file_write_size 512k; | |
fastcgi_intercept_errors on; | |
} | |
include give.conf; | |
include givedev.conf; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment