Last active
January 3, 2017 00:37
-
-
Save ndavison/5c8d73a242bd85231387 to your computer and use it in GitHub Desktop.
Nginx load balancing configuration for HHVM and Drupal
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
upstream myapp1 { | |
server 127.0.0.1:9000; | |
server 127.0.0.1:9001; | |
} | |
server { | |
listen 80; | |
server_name localhost; | |
root /var/www/html; | |
index index.php; | |
location / { | |
error_page 404 = @drupal; | |
} | |
location ~ \.(php|module|profile|theme|inc|install|info|test)$ { | |
fastcgi_pass myapp1; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
location @drupal { | |
rewrite ^(.*)$ /index.php?q=$1 last; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment