Just for references, I am talking about this tutorial:
http://www.howtoforge.com/nginx-catc...n-debian-lenny
The issue is this: I have reached the limits of my current server config.
I remember I didn't want to have any such installation of nginx or lighttpd a couple of years ago as traffic and logging were still an issue back than. It seems having nginx as a front-end web server works for traffic counting and logging now? Even if it doesn't I'd still love to implement this.
Now onto my questions:
Does anyone actually have this running according to the tutorial I linked to? Any other configuration changes I'd need if running the latest ispcfg3 and the latest Debian installation according to the perfect debian server setup from howtoforge?
I don't fully understand this configuration file:
Code:
server {
listen 80 default;
server_name _;
server_name_in_redirect off;
resolver 127.0.0.1;
#### 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;
access_log off;
expires 30d;
}
location / {
root /var/www/$host/web;
index index.html index.htm index.php;
access_log off;
proxy_pass http://$host:82;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Does this configuration automatically redirect any request from www. to the non-www version? I can't have that, I have to let my clients decide that for themselves.
Can I remove that by commenting the code like this:
Code:
#### www. redirect - all domains starting with www will be redirected to http://domain. ####
### if ($host ~* ^(www\.)(.+)) {
### set $rawdomain $2;
### rewrite ^/(.*)$ http://$rawdomain/$1 permanent;
### }
what exactly does this code do?
Quote:
access_log /var/log/ispconfig/httpd/$host/access.log;
location ~* ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|d oc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js |swf|flv|html|htm|mp3)$ {
root /var/www/$host/web;
access_log off;
expires 30d;
|
To me it looks like it integrates into the existing logging system?
Does it log errors too?
Can someone add that code?
Why does it say access_log off; is it disabled?
anything else I need to know before heading out and implementing this tutorial? Any issues I should be aware off? Any incompatibilities involved?
Can I continue updating ISPCFG3 as before without breaking anything?
Recent comments
11 hours 2 min ago
13 hours 29 min ago
1 day 1 hour ago
1 day 4 hours ago
1 day 8 hours ago
1 day 14 hours ago
1 day 23 hours ago
2 days 1 hour ago
2 days 9 hours ago
2 days 11 hours ago