View Single Post
  #1  
Old 15th October 2010, 01:25
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,262
Thanks: 78
Thanked 24 Times in 20 Posts
Default question regarding the Nginx Catch-All Host As Front End To Apache For ISPConfig3 tut

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?
Reply With Quote
Sponsored Links