Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream php_backend
- {
- # server unix:/tmp/php-cgi.socket;
- server 127.0.0.1:9000;
- server 127.0.0.1:9000;
- }
- server
- {
- listen 80;
- server_name localhost;
- charset utf-8;
- index index.php index.html;
- root /home/avalak/localhost;
- location /
- {
- try_files $uri $uri/ @php;
- }
- ## PHP5-FPM handler
- location ~ .php$
- {
- ## NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- fastcgi_pass php_backend;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- }
- location @php
- {
- ## NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
- fastcgi_pass php_backend;
- fastcgi_index index.php;
- include fastcgi_params;
- fastcgi_param SCRIPT_FILENAME $document_root/index.php;
- }
- location ~* \.(js|css|png|jpg|jpeg|gif|ico)$
- {
- expires max;
- log_not_found off;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement