Advertisement
Guest User

Untitled

a guest
Jun 29th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nginx 0.75 KB | None | 0 0
  1. server {
  2.     listen   80;
  3.     server_name www.example.com;
  4.     rewrite ^(.*) http://example.com$1 permanent;
  5. }
  6.  
  7.  
  8. server {
  9.     listen   80;
  10.     server_name example.com;
  11.  
  12.     # root directive should be global
  13.     root   /home/example/front/webroot/;
  14.     index  index.php;
  15.  
  16.     access_log /home/example/access.log;
  17.     error_log /home/example/error.log;
  18.  
  19.     location / {
  20.         try_files $uri $uri/ /index.php?$args;
  21.     }
  22.  
  23.     location ~ \.php$ {
  24.     try_files $uri =404;
  25.       fastcgi_split_path_info ^(.+\.php)(/.+)$;
  26.       # fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
  27.       fastcgi_pass php-fpm;
  28.       fastcgi_index index.php;
  29.       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  30.       include fastcgi_params;
  31.     }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement