Problems installing with virtual hosts

JLM
2005-02-18
2013-04-29
  • JLM
    JLM
    2005-02-18

    Message sent by Kenf

    Hello

    I was able to install wikiwig on one machine running an
    apache web server 2.x as localhost and get it working.
    However when I attempt to install another instance to
    another machine running Apache Web Server 1.3.x it is unable
    to connect to server localhost, or any other server name I
    attempt to put in there. What do I put for the server
    Database host entry?

    Help!

    I suspect it might have to do with the other virtual hosts I
    have setup (see below)

    Setup
    I have mysql 4.1 installed and working with another web
    application.
    I've verified the php to Mysql setup is working (I had been
    getting a mysql extention error prior, which I've fixed)
    I have verified the login for the database user works from a
    shell command.
    I have attempted to just use the "root" login and PW for the
    database

    Here is the Apache setup I have

    I have one external IP address assigned to a router which
    takes all http: traffic on port 80 and routes it to the web
    server on an internal IP.  The webserver is setup with 3
    virtual hosts.  The one I'm using is

    <VirtualHost 192.168.1.70>
       ServerAdmin webmaster@kenfserver.com
        DocumentRoot "C:\Program Files\Apache
    Group\Apache\htdocs\kenfserver"
       ServerName www.kenfserver.com
       ErrorLog logs/oyasoftware_ERRORS.log
    </VirtualHost>

    I've attempted to use www.kenfserver.com as the server name
    but the same error results when accessing.

    http://www.kenfserver.com/wiki/_wk/setup/?

    I am able to access http://localhost/wiki/   but it
    re-directs to http://www.kenfserver.com/wiki/_wk/setup/?
    URL and then fails on verify and save.

    Other relevant sections of the httpd.conf are...
    These are the default settings for appache vs the specific
    ones listed above

    ServerName www.kenfserver.com
    #servername localhost
    I've tried both
    DocumentRoot "C:\Program Files\Apache
    Group\Apache\htdocs\kenfserver"
    <Directory />
       Options FollowSymLinks
       AllowOverride None
    </Directory>

    # Controls who can get stuff from this server.
    #
       Order allow,deny
       Allow from all
    </Directory>

    <Directory "C:/Program Files/Apache
    Group/Apache/htdocs/kenfserver/wiki">

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

     
    • JLM
      JLM
      2005-02-18

      Hye Ken, I'm not an Apache master, in particular with virtual hosts. :-)

      But what I know, is about the script that redirects you from localhost/wiki/ to www.kenfserver.com/wiki/ is based on the PHP variable $_SERVER['HTTP_HOST'].
      It seems that with virtual hosts, this var takes the value of www.kenfserver.com and not localhost. I didn't meet similar error before.
      (So maybe the use of $_SERVER['HTTP_HOST'] is  not really portable.)

      Could you tell me exactly what the setup sends you as errors when clicking the "verify and save" button ?
      Look if a file named "wk_config.php" have been created in the "_wk" root folder. If yes, look at the values set for the variable $WK['wkHTTPPath']

      Note about setup

      When you setup wikiwig, you access the script with the final host name.
      Example :
      you aim to use wikiwig on the http://www.kenfserver.com
      So don't launch the setup from http://localhost
      This is necessary for the setup script to well configure you HTTP Path.

       
    • ken
      ken
      2005-02-22

      Hey,

      Thanks for the quick response...
      The specific wikiwig error message was "unable to access database at localhost, check the server name" etc...

      I tried another MySQL wiki, ran into the same thing... but managed to pull another error message which was "Client does not support authentication protocol"

      That being the more accurate error message I was able to locate this error at mysql's knowledge base located here... http://dev.mysql.com/doc/mysql/en/old-client.html

      In short the webserver I was using an earlier (apache 1.3.x) wasn't passing the login and PW properly to MySQL 4.1 for wikiwig and failing regardless of what values were entered into the configuration.  As you can read from the documentation MySQL 4.0 does not have this problem.  Setting the password as directed resolved the problem for me and I have it working on a virtual host setup...