mysql database not able to connect to drupal site not accessible on reverse proxy

Discussion in 'Server Operation' started by vtapas, Apr 14, 2010.

  1. vtapas

    vtapas New Member

    I installed apache2 and mysql database on a Debian system.
    It is using reverse proxy on apache to redirect requests to apache2 running on any machine which is on Xen server as a Virtual host.

    I tried to install Drupal on it. Every thing went fine till
    I pointed my browser to

    http://IP of LAN where Drupal was installed/drupal
    then I see an installation page of Drupal which welcomes me
    I click install in English
    then it can not proceed to connect with database.
    Code:
    Database configuration
    Your web server does not appear to support any common database types. Check with your hosting provider to see if they offer any databases that Drupal supports.
    
    I have created a database and username for Drupal separately.
    What should I check to.

    There is one more error
    Code:
    http://Public IP/some location/
    
    Is showing me contents of Document Root
    but there is a folder named drupal on it.
    When I click on it I get error.
    Code:
    Not Found
    
    The requested URL /drupal/ was not found on this server.
    Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny8 with Suhosin-Patch proxy_html/3.0.0 Server at
    
    What things should I check in for?
    I am also getting errors like
    Code:
    Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
    
    on individual DomU's what should I check in.

    and on Dom0 when restarting apache2 I get following error.
    Code:
    Reloading web server config: apache2apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
    [Wed Apr 14 15:23:05 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
    
     
  2. vtapas

    vtapas New Member

    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/...+behind+a+Reverse+Proxy+Server+(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.
     

Share This Page