Created
June 3, 2014 15:32
-
-
Save bearlikelion/b94cfce647c2c9eec7a6 to your computer and use it in GitHub Desktop.
nginx.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
server { | |
listen *:80; | |
server_name mark.dev; | |
root /home/mark/dev/src/public; | |
index index.php; | |
location / { | |
# rewrite URL to remove trailing forward slash / | |
rewrite ^/(.*)/$ /$1 permanent; | |
try_files $uri /index.php?$query_string; | |
} | |
location /phpmyadmin { | |
root /usr/share/; | |
index index.php; | |
location ~* ^/phpmyadmin/(.+\.(jpg|jpeg|gif|css|png|js|ico|html|xml|txt))$ { | |
root /usr/share/; | |
} | |
location ~ \.php$ { | |
include /etc/nginx/fastcgi_params; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME /usr/share$fastcgi_script_name; | |
} | |
} | |
# HHVM | |
location ~ \.php$ { | |
fastcgi_pass 127.0.0.1:9001; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
} | |
# PHP-FPM | |
# location ~ \.php$ { | |
# fastcgi_pass 127.0.0.1:9000; | |
# fastcgi_index index.php; | |
# fastcgi_param ENVIRONMENT DEVELOPMENT; | |
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
# include fastcgi_params; | |
# } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment