Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 82 default;
- server_name _;
- server_name_in_redirect off;
- resolver localhost;
- #### www. redirect - all domains starting with www will be redirected to http://domain. ####
- # if ($host ~* ^(www\.)(.+)) {
- # set $rawdomain $2;
- # rewrite ^/(.*)$ http://$rawdomain/$1 permanent;
- # }
- access_log /var/log/ispconfig/httpd/$host/access.log;
- 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)$ {
- # root /var/www/$host/web;
- set $site_dir $host; if ($host ~ ^www\.(.*)) { set $site_dir $1; } root /var/www/$site_dir/web;
- access_log off;
- expires 30d;
- }
- location / {
- root /var/www/$host/web;
- index index.html index.htm index.php;
- access_log off;
- proxy_pass http://127.0.0.1:80;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement