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.
Reply
 
Thread Tools Display Modes
  #1  
Old 15th October 2010, 02:25
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
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:

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
  #2  
Old 15th October 2010, 17:21
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

Anyone? Please, I#d be very glad even for partial answers - maybe you know hte answer to one of my questions at least?
Reply With Quote
  #3  
Old 18th October 2010, 16:49
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

really nobody can add anything to my questions?
I promise I won't bump it again!

oh and is this tutorial compatible with this nginx version: nginx (0.7.67-3~bpo50+1 Debian Backports:lenny-backports) ?

Last edited by Ovidiu; 18th October 2010 at 18:07.
Reply With Quote
  #4  
Old 19th October 2010, 17:26
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

I'd love to help, but I didn't try the tutorial.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 19th October 2010, 20:53
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

the problem is I don't have a testing server :-( that is the reason I was asking for people who have used/tried this plugin.

Tried contacting the author of the howto but no response yet.
Reply With Quote
  #6  
Old 20th October 2010, 11:27
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

@falko:

is the part about ispcfg3 at least correct?
I mean the part with the custom templates and can I continue updating ispcfg3 without breaking anything?

I guess I will have ot give it a try one of these nights and would liek to at least know that if I get it to work I won't be sacrificing my future updates of ispcfg3...
Reply With Quote
  #7  
Old 20th October 2010, 11:51
damir damir is offline
Senior Member
 
Join Date: Jun 2006
Posts: 375
Thanks: 11
Thanked 51 Times in 42 Posts
Default

Tenaka, install VM Player and install virtual machine that simulates your environment. Test it and than deploy it to your production server.

Why try something that you are not familiar with on your live server and risk breaking the installation.
Reply With Quote
  #8  
Old 21st October 2010, 15:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by damir View Post
Tenaka, install VM Player and install virtual machine that simulates your environment. Test it and than deploy it to your production server.
That's what I'd recommend as well.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #9  
Old 22nd October 2010, 04:06
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
Default

:-) I know its good practice but I live in a country where the average internet connection is 384kbps. and I have 4 flatmates which gives each of us about 56k => modem speed I had 15 years ago when I lived in Europe :-(

Will try and duplicate a test environment at home though but i.e. the upgrading I can't simulate I'd have to wait for a new ispcfg version to test...

Last edited by Ovidiu; 22nd October 2010 at 04:14.
Reply With Quote
  #10  
Old 23rd October 2010, 05:32
Ovidiu Ovidiu is offline
Senior Member
 
Join Date: Sep 2005
Posts: 1,270
Thanks: 84
Thanked 25 Times in 21 Posts
 
Default

ran into some trouble, here is the error log:

Quote:
tail -f /var/log/nginx/error.log
2010/10/23 04:20:02 [error] 28148#0: *4 pacura.ru could not be resolved (5: Operation refused), client: 196.210.184.235, server: _, request: "GET /wp-admin/index.php HTTP/1.1", host: "pacura.ru", referrer: "http://pacura.ru/wp-admin/index.php?w3tc_note=flush_pgcache"
2010/10/23 04:20:02 [error] 28148#0: *5 testing "/usr/local/nginx/html" existence failed (2: No such file or directory) while logging request, client: 127.0.0.1, server: _
2010/10/23 04:20:03 [error] 28148#0: *6 testing "/usr/local/nginx/html" existence failed (2: No such file or directory) while logging request, client: 89.28.21.131, server: _
2010/10/23 04:20:05 [error] 28148#0: *7 localhost could not be resolved (5: Operation refused), client: 127.0.0.1, server: _, request: "GET /server-status?auto HTTP/1.1", host: "localhost"
2010/10/23 04:20:53 [error] 28148#0: *70 open() "/var/www/dany.zice.ro/web/robots.txt" failed (2: No such file or directory), client: 142.166.170.100, server: _, request: "GET /robots.txt HTTP/1.1", host: "dany.zice.ro"
as far as I can see there are problems with the apache2 module server-status and subdirectories: /var/www/dany.zice.ro/web/robots.txt zice.ro is a wpmu installation where all subdomaisn are added dynamically. :-(

Anyone has any ideas?
Reply With Quote
Reply

Bookmarks

Tags
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:58.


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