Advertisement
Guest User

Nginx vhost

a guest
Jan 1st, 2013
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. log_format domain.com '$remote_addr - $remote_user [$time_local] $request '
  2. '$status $body_bytes_sent $http_referer '
  3. '$http_user_agent $http_x_forwarded_for';
  4. server
  5. {
  6. listen 80;
  7. server_name domain.com;
  8. index index.html index.htm index.php default.html default.htm default.php;
  9. root /home/wwwroot/domain.com;
  10.  
  11. include custom.conf;
  12. location ~ .*\.(php|php5)?$
  13. {
  14. try_files $uri =404;
  15. fastcgi_pass unix:/tmp/php-cgi.sock;
  16. fastcgi_index index.php;
  17. include fcgi.conf;
  18. }
  19.  
  20. location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|ico)$
  21. {
  22. expires 30d;
  23. }
  24.  
  25. location ~ .*\.(js|css)?$
  26. {
  27. expires 30d;
  28. }
  29.  
  30. access_log /home/wwwlogs/domain.com.log domain.com;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement