-
-
Save nntoan/3db457f5a9fbbdd9aa85 to your computer and use it in GitHub Desktop.
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