Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen server_ip:80;
- server_name example.com;
- root /var/www/example.com/current/web/;
- access_log /var/log/nginx/example.com/access.log;
- error_log /var/log/nginx/example.com/error.log;
- rewrite ^/app\.php/?(.*)$ /$1 permanent;
- location / {
- index app.php;
- try_files $uri @rewriteapp;
- }
- location @rewriteapp {
- rewrite ^(.*)$ /app.php/$1 last;
- }
- location ~ ^/(app|app_dev|config)\.php(/|$) {
- fastcgi_pass unix:/var/run/example-com-php5-fpm.sock;
- fastcgi_split_path_info ^(.+\.php)(/.*)$;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- fastcgi_param HTTPS off;
- }
- location ~* ^.+\.(jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|wav|bmp|rtf|htc)$ {
- expires 31d;
- add_header Cache-Control private;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement