Advertisement
Guest User

nginx conf

a guest
Nov 3rd, 2010
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.06 KB | None | 0 0
  1. server {
  2.         listen 82 default;
  3.         server_name  _;
  4.         server_name_in_redirect  off;
  5.         resolver  localhost;
  6. #### www. redirect      - all domains starting with www will be redirected to http://domain. ####
  7. #    if ($host ~* ^(www\.)(.+)) {
  8. #        set $rawdomain $2;
  9. #        rewrite ^/(.*)$  http://$rawdomain/$1 permanent;
  10. #    }
  11.        access_log  /var/log/ispconfig/httpd/$host/access.log;
  12. location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|flv|html|htm|mp3)$ {
  13. #       root   /var/www/$host/web;
  14. set $site_dir $host; if ($host ~ ^www\.(.*)) { set $site_dir $1; } root /var/www/$site_dir/web;
  15.         access_log off;
  16.         expires 30d;
  17.     }
  18. location / {
  19.         root   /var/www/$host/web;
  20.         index  index.html index.htm index.php;
  21.         access_log      off;
  22.         proxy_pass http://127.0.0.1:80;
  23.         proxy_set_header X-Real-IP  $remote_addr;
  24.         proxy_set_header Host $host;
  25.         proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement