Virtual Host Confiugration?

Discussion in 'General' started by izrunas, May 29, 2009.

  1. izrunas

    Joined:
    Mar 4, 2009
    Messages:
    94
    Likes Received:
    0
    What do I need to do to utilize name-based virtual hosts on an Elastix box? I added the normal directive to httpd.conf. Here's the tail of my new httpd.conf:

    (In the following, "XXXXX", etc. is only used to withhold identifying information.)


    Code:
    NameVirtualHost *:443
    NameVirtualHost *:80
    
    <VirtualHost XXXXX.auseklis.net:80>  
        ServerName XXXXX.auseklis.net
        ServerAdmin XXXXXXXX@XXXXXXX.XXX
        DocumentRoot /opt/rt3/share/html
        AddDefaultCharset UTF-8
        PerlRequire /opt/rt3/bin/webmux.pl
    <Directory /opt/rt3/share/html>
        Order allow,deny
        Allow from all
    
        SetHandler perl-script
        PerlResponseHandler RT::Mason
    </Directory>
    </VirtualHost>
    
    <VirtualHost XXXXX.auseklis.net:443>
        ServerName XXXXX.auseklis.net
        ServerAdmin XXXXXXXX@XXXXXXX.XXX
        DocumentRoot /opt/rt3/share/html
        AddDefaultCharset UTF-8
        PerlRequire /opt/rt3/bin/webmux.pl
    <Directory /opt/rt3/share/html>
        Order allow,deny
        Allow from all
    
        SetHandler perl-script
        PerlResponseHandler RT::Mason
    </Directory>
    </VirtualHost>
    
    When I go to restart Apache, I am getting this result:

    Code:
    [root@localhost]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd: [Fri May 29 09:00:04 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                               [  OK  ]
    [root@localhost]# 
    
     
  2. rafael

    Joined:
    May 14, 2007
    Messages:
    1,454
    Likes Received:
    1
    It seems to be ok. I do not think you can have named virtual host for https. Try commenting out the namevirtual host for 443.

    regards,

    rafael
     
  3. izrunas

    Joined:
    Mar 4, 2009
    Messages:
    94
    Likes Received:
    0
    When I comment out the 443 line, I still get this when I restart Apache:

    Code:
    [root@localhost ~]# service httpd restart
    Stopping httpd:                                            [  OK  ]
    Starting httpd: [Fri May 29 12:33:51 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
                                                               [  OK  ]
    [root@localhost ~]# 
    
    After this change, it still does not work. When I enter the URL of the virtualhost name, it simply beings up the SSL version of the Elastix management homepage.

    Other ideas?
     
  4. alang

    Joined:
    Mar 19, 2008
    Messages:
    47
    Likes Received:
    0
    As rafael said the Name-based virtual host cannot be used with HTTPS, to see the more detail information at http://httpd.apache.org/docs/2.0/vhosts/name-based.html

    In addition you shouldn't modify httpd.conf if you're using Elastix. It should be /etc/httpd/conf.d/elastix.conf, I think it's better that you can modify all things you need within this file.
     

Share This Page