Skip to content

Instantly share code, notes, and snippets.

@DTrejo
Created January 23, 2014 17:10
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 DTrejo/8582631 to your computer and use it in GitHub Desktop.
Save DTrejo/8582631 to your computer and use it in GitHub Desktop.
# wordpress over fastcgi
server {
listen 81;
server_name _;
root /mnt/apps/airpair-blog/current;
index index.html index.php /index.php;
# restricting all dot files
location ~ /\. { return 403; }
location / {
try_files $uri $uri/ /index.php?$args;
}
# Add trailing slash to */wp-admin requests.
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~ \.php$ {
include fastcgi_params;
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
fastcgi_pass 127.0.0.1:9000;
}
}
server {
listen 80;
server_name _;
# Home page is node.js app
location = / {
proxy_pass http://airpair-com-prod.herokuapp.com;
}
# Node.js
location /find-an-expert {
proxy_pass http://airpair-com-prod.herokuapp.com;
}
# another node Node.js
location /login {
proxy_pass http://airpair-com-prod.herokuapp.com;
}
# rest to wordpress
location / {
proxy_set_header Host $proxy_host:80;
proxy_pass http://127.0.0.1:81;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment