Advertisement
Guest User

Untitled

a guest
Sep 17th, 2014
194
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.81 KB | None | 0 0
  1. server {
  2.         listen   80;
  3.      
  4.  
  5.         root /usr/share/nginx/www;
  6.         index index.php index.html index.htm;
  7.  
  8.         server_name example.com;
  9.  
  10.         location / {
  11.                 try_files $uri $uri/ /index.html;
  12.         }
  13.  
  14.         error_page 404 /404.html;
  15.  
  16.         error_page 500 502 503 504 /50x.html;
  17.         location = /50x.html {
  18.               root /usr/share/nginx/www;
  19.         }
  20.  
  21.         # pass the PHP scripts to FastCGI server listening on the php-fpm socket
  22.         location ~ \.php$ {
  23.                 try_files $uri =404;
  24.                 fastcgi_pass unix:/var/run/php5-fpm.sock;
  25.                 fastcgi_index index.php;
  26.                 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  27.                 include fastcgi_params;
  28.                
  29.         }
  30.  
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement