#1  
Old 14th April 2010, 13:43
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
Default apache reverse proxy

I used following how to
http://www.howtoforge.com/apache_rev...roxy_ispconfig

I did not used ispconfig.

I did same as it mentioned.
But the warning are still there.
Code:
 Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Wed Apr 14 13:09:34 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
/etc/apache2/apache2.conf looks like
Code:
NameVirtualHost *
<VirtualHost *>
        ServerName mydomain.in
        DocumentRoot /var/www
        ProxyRequests Off
       <Proxy *>
       Order deny,allow
       Allow from all
       </Proxy>
     ProxyPass /domu1 http://192.168.1.13/
     ProxyPass /domu2 http://192.168.1.14/
     ProxyPass /domu3   http://192.168.1.15/
     ProxyPass /domu4      http://192.168.1.16/
     ProxyPassReverse /domu1 http://192.168.1.13/
     ProxyPassReverse /domu2 http://192.168.1.14/
     ProxyPassReverse /domu3   http://192.168.1.15/
     ProxyPassReverse /domu4      http://192.168.1.16/
</VirtualHost>
There is no line that has NameVirtualHost in sites-available/default
file.It looks like following in my case
Code:
<VirtualHost *:80>
        ServerAdmin webmaster@localhost

        DocumentRoot /var/www/
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn

        CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>
What else should I check in for? So that the warning goes. Everything else is working fine.I can see my servers running on DomU's
on Intranet and outside as well.
Reply With Quote
Sponsored Links
  #2  
Old 15th April 2010, 15:07
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Modify apache2.conf as follows:

Code:
NameVirtualHost *:80
<VirtualHost *:80>
        ServerName mydomain.in
        DocumentRoot /var/www
        ProxyRequests Off
       <Proxy *>
       Order deny,allow
       Allow from all
       </Proxy>
     ProxyPass /domu1 http://192.168.1.13/
     ProxyPass /domu2 http://192.168.1.14/
     ProxyPass /domu3   http://192.168.1.15/
     ProxyPass /domu4      http://192.168.1.16/
     ProxyPassReverse /domu1 http://192.168.1.13/
     ProxyPassReverse /domu2 http://192.168.1.14/
     ProxyPassReverse /domu3   http://192.168.1.15/
     ProxyPassReverse /domu4      http://192.168.1.16/
</VirtualHost>
__________________
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
  #3  
Old 15th April 2010, 18:28
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Ya I did that and after a reboot I got following
Code:
/etc/apache2# /etc/init.d/apache2 reload
Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[Thu Apr 15 17:53:09 2010] [warn] NameVirtualHost *:80 has no VirtualHost
Here is how my apache2.conf looks like

Code:
# Include generic snippets of statements
Include /etc/apache2/conf.d/
NameVirtualHost *:80
<VirtualHost *:80>
        ServerName lan.in
        DocumentRoot /var/www
        ProxyRequests Off
       <Proxy *>
       Order deny,allow
       Allow from all
       </Proxy>
     ProxyPass /domu1                http://192.168.1.13/
     ProxyPass /domu2                http://192.168.1.14/
     ProxyPass /domu3                http://192.168.1.15/
     ProxyPass /domu4                http://192.168.1.16/
     ProxyPassReverse /domu1     http://192.168.1.13/
     ProxyPassReverse /domu2     http://192.168.1.14/
     ProxyPassReverse /domu3     http://192.168.1.15/
     ProxyPassReverse /domu4     http://192.168.1.16/
</VirtualHost>
# Include the virtual host configurations:
#Include /etc/apache2/sites-enabled/
#Include /etc/phpmyadmin/apache.conf
Reply With Quote
  #4  
Old 16th April 2010, 09:08
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Okay here is what it worked I got it some where so posting it if some has same problem

comment that NameVirtualHost line above in apache2.conf
and put
servername directive in same file apache2.conf at the end.Then reload apache2 it should work.
Reply With Quote
  #5  
Old 17th April 2010, 19:41
vtapas vtapas is offline
Member
 
Join Date: Apr 2010
Posts: 51
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Hi yes you are right.Even then now I am posting a solution since by now I have solved the problem.
http://swik.net/MySQL/Planet+MySQL/O...(Apache)/dcslr

I am posting so that if some one else faces the same problem they may get a solution.Which is mentioned on the above link you can go there directly and read it.
Code:
When you install drupal on a server which is behind apache reverse proxy you need to tell that drupal installation about the presence of reverse proxy in your nework.
That is the core of the problem.
To achieve this you need to do do following
in your drupal installation folder go to sites/default/settings.php
and change the following

$base_url="http://www.mydomain.com/;
then 
$cookie_domain = 'proxyserver.yourdomain.com';

if above both are same then place them same values
then
uncomment 

$conf = array(

then
uncomment 
'reverse_proxy' => TRUE,

then 
'reverse_proxy_addresses' => array('192.168.0.1',),
replace it by IP of your apache reverse proxy 

and uncomment below it
);
Hopefully it should work.
Keywords to search for this are if you are using drupal
"drupal behind apache reverse proxy"

You can get same problem if you do not use drupal the thing is any web server running behind a proxy needs to know how to handle requests which are forwarded by proxy.
Some one if comes across same situation do reply here make a blog etc it will help others.
Reply With Quote
Reply

Bookmarks

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
Reverse Proxy in Apache yasantha HOWTO-Related Questions 0 21st May 2009 12:00
Configure Squid reverse proxy for apache staticanime Installation/Configuration 2 11th May 2009 14:03
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
Mod_Perl Configuration Issue szise Installation/Configuration 4 28th November 2008 12:41
Apache reverse proxy with mod_proxy and 302 redirection Cloud Server Operation 6 1st March 2008 14:55


All times are GMT +2. The time now is 09:12.


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