Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name www.example.com;
- rewrite ^(.*) http://example.com$1 permanent;
- }
- server {
- listen 80;
- server_name example.com;
- # root directive should be global
- root /home/example/front/webroot/;
- index index.php;
- access_log /home/example/access.log;
- error_log /home/example/error.log;
- location / {
- try_files $uri $uri/ /index.php?$args;
- }
- location ~ \.php$ {
- try_files $uri =404;
- fastcgi_split_path_info ^(.+\.php)(/.+)$;
- # fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
- fastcgi_pass php-fpm;
- fastcgi_index index.php;
- fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
- include fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement