Guest User

Untitled

a guest
Oct 1st, 2012
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. server {
  2. listen 80;
  3.  
  4. server_name localhost;
  5. root /usr/share/nginx/www/firstapp/web;
  6.  
  7. access_log /var/log/nginx/$host.access.log;
  8. error_log /var/log/nginx/error.log error;
  9.  
  10. # strip app.php/ prefix if it is present
  11. rewrite ^/app\.php/?(.*)$ /$1 permanent;
  12.  
  13. location / {
  14. root /usr/share/nginx/www/firstapp/web/;
  15. index app.php;
  16. try_files $uri @rewriteapp;
  17.  
  18.  
  19. }
  20.  
  21. location /makeup/ {
  22. alias /usr/share/nginx/www/seccondapp/web/;
  23. index app.php;
  24. try_files $uri @rewriteapp;
  25.  
  26.  
  27. }
  28. location @rewriteapp {
  29. rewrite ^(.*)$ /app.php/$1 last;
  30. }
  31.  
  32. # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
  33. location ~ ^/(app|app_dev)\.php(/|$) {
  34. #fastcgi_pass 127.0.0.1:9000;
  35. fastcgi_pass unix:/var/lib/php5-fpm/www.sock;
  36. fastcgi_split_path_info ^(.+\.php)(/.*)$;
  37. include fastcgi_params;
  38. fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  39. fastcgi_param HTTPS off;
  40. #fastcgi_param SERVER_PORT 80;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment