Created
October 3, 2012 08:12
-
-
Save gvinaccia/3825747 to your computer and use it in GitHub Desktop.
Nginx: vhost 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 { | |
root /srv/www/__DOCROOT__; | |
index index.php index.html index.htm; | |
error_log /var/log/nginx/__HOSTNAME__.error.log; | |
# hostname così come appare in /etc/hosts | |
server_name __HOSTNAME__; | |
location / { | |
try_files $uri $uri/ /index.php; | |
expires 30d; | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
fastcgi_read_timeout 86400s; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment