Advertisement
Guest User

Untitled

a guest
Jun 24th, 2015
384
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. server {
  2. listen 80;
  3. server_name sitename.com;
  4.  
  5. access_log /usr/share/nginx/sitename.com/logs/access.log;
  6. error_log /usr/share/nginx/sitename.com/logs/error.log;
  7.  
  8. location / {
  9. root /usr/share/nginx/sitename.com;
  10. index index.php index.html index.htm;
  11.  
  12. if (-f $request_filename) {
  13. expires 30d;
  14. break;
  15. }
  16.  
  17. if (!-e $request_filename) {
  18. rewrite ^(.+)$ /index.php?q=$1 last;
  19. }
  20. }
  21.  
  22. location ~ .php$ {
  23. fastcgi_pass   localhost:9000;  # port where FastCGI processes were spawned
  24. fastcgi_index  index.php;
  25. fastcgi_param  SCRIPT_FILENAME   /usr/share/nginx/sitename.com$fastcgi_script_name;  # same path as above
  26. fastcgi_param PATH_INFO               $fastcgi_script_name;
  27. include /etc/nginx/fastcgi_params;
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement