-
-
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
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 { | |
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