Created
November 24, 2014 23:14
-
-
Save rianorie/10681bd1558b21d3ec2a to your computer and use it in GitHub Desktop.
Phalcon 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 demo.dev; | |
index index.php index.html index.htm; | |
set $root_path '/data/www/public'; | |
root $root_path; | |
try_files $uri $uri/ @rewrite; | |
location @rewrite { | |
rewrite ^/(.*)$ /index.php?_url=/$1; | |
} | |
location ~ \.php { | |
fastcgi_pass 127.0.0.1; | |
fastcgi_index /index.php; | |
include fastcgi_params; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_param PATH_INFO $fastcgi_path_info; | |
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
} | |
location ~* ^/(css|img|js|flv|swf|download)/(.+)$ { | |
root $root_path; | |
} | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment