Advertisement
Guest User

Untitled

a guest
Feb 23rd, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.30 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name example.com localhost;
  4.  
  5. #charset koi8-r;
  6.  
  7. #access_log logs/host.access.log main;
  8.  
  9. location /blog/ {
  10. root /home/deploy/www/blog.example.com/html;
  11. index index.php;
  12. try_files $uri $uri/ /blog/index.php;
  13. }
  14.  
  15. location ~ .php$ {
  16. root /home/deploy/www/blog.example.com/html;
  17. fastcgi_pass 127.0.0.1:9000;
  18. fastcgi_index index.php;
  19. include fastcgi_params;
  20. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  21. }
  22.  
  23. location / {
  24. root /home/deploy/www/example.com/public;
  25. passenger_enabled on;
  26. index index.html index.htm;
  27. }
  28.  
  29. location ~ ^/blog/.*(.php)?$ {
  30. fastcgi_split_path_info ^(.+.php)(.*)$;
  31. root /home/deploy/www/blog.example.com/html;
  32. try_files $uri =404;
  33. # fastcgi_split_path_info ^(/blog/.+.php)(.*)$;
  34.  
  35. #fastcgi_split_path_info ^(.+.php)(/.+)$;
  36. #NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
  37.  
  38. include fastcgi_params;
  39. fastcgi_index index.php;
  40. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  41. # fastcgi_intercept_errors on;
  42. fastcgi_pass 127.0.0.1:9000;
  43. }
  44.  
  45. try_files index.php blog/index.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement