Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 15th October 2010, 02:25
Ovidiu Ovidiu is offline
Senior Member
Join Date: Sep 2005
Posts: 1,269
Thanks: 84
Thanked 25 Times in 21 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:

server {
    listen   80 default; 
        server_name  _;
        server_name_in_redirect  off;
#### 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:
#### 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?
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


apache2, ispcfg3, nginx, proxy, reverse

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Nginx Catch-All Host As Front End To Apache For ISPConfig 3 On Debian Lenny fatmaddin2000 HOWTO-Related Questions 1 27th June 2010 22:52
trying to install roundcubemail ressel Installation/Configuration 13 24th December 2009 21:13
problems with suexec gobokster Installation/Configuration 7 7th May 2009 14:33
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 21:58
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 01:45

All times are GMT +2. The time now is 11:00.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.