Virtual hosting with Apache not working

Discussion in 'Server Operation' started by gimhan90, Feb 8, 2006.

  1. gimhan90

    gimhan90 New Member

    Hi folks,


    We need to create a virtual server for ispconfig.It's currently running on
    https port 81. but not working for the following configurations .Here is vhosts.d file contents

    Please look at this .All comments are welcome.

    DocumentRoot /home/admispconfig/ispconfig/web/
    <Directory "/home/admispconfig/ispconfig/web/">
    allow from all
    Options +Indexes
    </Directory>
    SSLEngine on
    SSLCertificateFile /root/ispconfig/httpd/conf/ssl.csr/server.csr
    SSLCertificateKeyFile /root/ispconfig/httpd/conf/ssl.csr/server.key
    SSLProtocol +SSLv2 +TLSv1
    ServerAlias admin.example.com
    UserDir "/home/admispconfig/ispconfig/web/"


    Thx in advance,
    gimhan
     
  2. falko

    falko Super Moderator

    What exactly is not working?
     
  3. gimhan90

    gimhan90 New Member


    my ispconfig is running on port 81 with https.I need to access it with a record alias.cosmoforge.com.I set the virtual server configuration as i mention above.But it dosent work.Page cannot be displayed
     
    Last edited: Feb 8, 2006
  4. falko

    falko Super Moderator

    You mean you want to access ISPConfig using https://alias.cosmoforge.com:81?

    Set the URL to https://alias.cosmoforge.com:81 in /home/admispconfig/ispconfig/lib/config.inc.php, then replace admin.example.com with alias.cosmoforge.com in /root/ispconfig/httpd/conf/httpd.conf and restart ISPConfig:
    Code:
    /etc/init.d/ispconfig_server restart
    Of course, alias.cosmoforge.com must point to your ISPConfig server.
     
  5. gimhan90

    gimhan90 New Member

    Can't i access the ispconfig with out entering the port no ,
    like https://alias.cosmoforge.com instead of https://www.cosmoforge.com:81
     
  6. till

    till Super Moderator

    The ISPConfig webserver is listening only on port 81. If you want to access ISPConfig without specifying a port in the URL, you need a dedicated IP for the ISPConfig apache webserver.
     
  7. falko

    falko Super Moderator

    You could create a file index.php in alias.cosmoforge.com which redirects to https://www.cosmoforge.com:81:

    PHP:
    <?php
    header
    ("Location: https://www.cosmoforge.com:81"); /* Redirect browser */

    /* Make sure that code below does not get executed when we redirect. */
    exit;
    ?> 
     
  8. gimhan90

    gimhan90 New Member

    Could you please direct me how to do that if i have a dedicated ip ?
    suppose i have an ip address named 66.241.123.143

    could u pls tel me the steps i have to follow to do this ?

    Thx in adavance,
    gimhan
     
  9. till

    till Super Moderator

    I meant a dedicated IP for the ISPCOnfig webserver that listens on port 81. This means he minimum for this configuration are 2 IP addresses, one for the ISPCOnfig apache and one for the main apache webserver.
     
  10. gimhan90

    gimhan90 New Member


    How can we configure it ? Do we need to dirtect the port (81) through DNS server ?
    or .. any ither process
     
  11. falko

    falko Super Moderator

    What about the redirect method I suggested?
     

Share This Page