Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name localhost;
- root /usr/share/nginx/www/firstapp/web;
- access_log /var/log/nginx/$host.access.log;
- error_log /var/log/nginx/error.log error;
- # strip app.php/ prefix if it is present
- rewrite ^/app\.php/?(.*)$ /$1 permanent;
- location / {
- root /usr/share/nginx/www/firstapp/web/;
- index app.php;
- try_files $uri @rewriteapp;
- }
- location /makeup/ {
- alias /usr/share/nginx/www/seccondapp/web/;
- index app.php;
- try_files $uri @rewriteapp;
- }
- location @rewriteapp {
- rewrite ^(.*)$ /app.php/$1 last;
- }
- # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
- location ~ ^/(app|app_dev)\.php(/|$) {
- #fastcgi_pass 127.0.0.1:9000;
- fastcgi_pass unix:/var/lib/php5-fpm/www.sock;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS off;
- #fastcgi_param SERVER_PORT 80;
- }
Advertisement
Add Comment
Please, Sign In to add comment