Skip to content

Instantly share code, notes, and snippets.

@StephanieSunshine
Forked from caquino/nginx.conf
Last active October 11, 2015 21:08
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 StephanieSunshine/5833210c326b7fb0bb99 to your computer and use it in GitHub Desktop.
Save StephanieSunshine/5833210c326b7fb0bb99 to your computer and use it in GitHub Desktop.
Hacking Nginx to do the same mass deployment trick of phusion passenger mass deployment in standalone -- Not verified to work yet
server {
listen 80 default;
# server_name ~^(www\.)?(?<domain>.+)$;
# The goal here is to allow for subdomains. We stack in reverse
server_name ~^(?<subdomain>\.)?(?<domain>.+)$;
root /opt/sites/$domain/$subdomain/public_html/;
access_log /opt/sites/$domain/logs/access.log;
# Need to remove the php-fpm stuff and replace with passenger open source stuff
location / {
index index.html index.htm index.php;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment