Created
November 29, 2016 08:07
-
-
Save lovelock/92bbad259007f2f515834bf58cd95870 to your computer and use it in GitHub Desktop.
A simple PHP nginx vhost
This file contains hidden or 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 example.com; | |
error_log /data/log/php/htdocs/error.log; | |
access_log /data/log/php/htdocs/access.log; | |
root /data/web/htdocs/public; | |
location / { | |
try_files $uri /index.php$is_args$args; | |
} | |
location ~ \.php { | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_pass 127.0.0.1:9000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment