Created
February 15, 2014 17:53
-
-
Save flug/9022713 to your computer and use it in GitHub Desktop.
Configuration for Cakephp Framework
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; | |
access_log /var/log/nginx/example.access.log; | |
error_log /var/log/nginx/example.error.log; | |
root /home/me/workspace/example/app/webroot/; | |
charset utf-8; | |
index index.php index.html index.htm; | |
location ~* \.(js|css|html?|xml|gz|jpe?g|gif|png|swf|wmv|flv|ico)$ { | |
expires 7d; | |
} | |
location / { | |
try_files $uri $uri/ /index.php?$uri&$args; | |
} | |
location ~ \.php$ { | |
try_files $uri = 404; | |
include fastcgi_params; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
fastcgi_index index.php; | |
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