Created
April 1, 2013 21:07
-
-
Save jyunderwood/5287771 to your computer and use it in GitHub Desktop.
Serving PHP with Nginx and PHP-FPM
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 example.com; | |
root /home/deploy/apps/example.com/public; | |
index index.html index.php; | |
client_max_body_size 1G; | |
fastcgi_buffers 64 4K; | |
location / { | |
try_files $uri $uri/ index.php; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
include fastcgi_params; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/tmp/php5-fpm.sock; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment