Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name example.com localhost;
- #charset koi8-r;
- #access_log logs/host.access.log main;
- location /blog/ {
- root /home/deploy/www/blog.example.com/html;
- index index.php;
- try_files $uri $uri/ /blog/index.php;
- }
- location ~ .php$ {
- root /home/deploy/www/blog.example.com/html;
- fastcgi_pass 127.0.0.1:9000;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- location / {
- root /home/deploy/www/example.com/public;
- passenger_enabled on;
- index index.html index.htm;
- }
- location ~ ^/blog/.*(.php)?$ {
- fastcgi_split_path_info ^(.+.php)(.*)$;
- root /home/deploy/www/blog.example.com/html;
- try_files $uri =404;
- # fastcgi_split_path_info ^(/blog/.+.php)(.*)$;
- #fastcgi_split_path_info ^(.+.php)(/.+)$;
- #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- include fastcgi_params;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- # fastcgi_intercept_errors on;
- fastcgi_pass 127.0.0.1:9000;
- }
- try_files index.php blog/index.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement