Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 11th September 2010, 00:19
paul_xedos paul_xedos is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default created site with IPs still get "NameVirtualHost has no VirtualHosts"

Hi,
I realise this is a commonly asked question but I've run out of ideas on this one despite trawling the forums and trying various suggestions

I'm runnnig ISPconfig3 with 2 sites that use IP addresses in their config. All resolve, none point to the correct site and on httpd stop/start receive the NameVirtualHost has no virtualhosts error

httpd.conf
Code:
#NameVirtualHost *:80
NameVirtualHost 78.46.106.188:80
NameVirtualHost 78.46.106.188:443
Include /etc/httpd/conf/sites-enabled/
.vhosts file
Code:
<Directory /var/www/glebegallery.com>
    AllowOverride None
    Order Deny,Allow
    Deny from all
</Directory>

<VirtualHost 78.46.106.188:80>
    DocumentRoot /var/www/clients/client3/web19/web

    ServerName glebegallery.com
	
    <Directory /var/www/glebegallery.com/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>
    <Directory /var/www/clients/client3/web19/web>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        Allow from all
        
        # ssi enabled
        AddType text/html .shtml
        AddOutputFilter INCLUDES .shtml
        Options +Includes
    </Directory>

    # cgi enabled
	<Directory /var/www/clients/client3/web19/cgi-bin>
      Order allow,deny
      Allow from all
    </Directory>
    ScriptAlias  /cgi-bin/ /var/www/clients/client3/web19/cgi-bin/
    AddHandler cgi-script .cgi
    AddHandler cgi-script .pl
    # suexec enabled
    SuexecUserGroup web19 client3
    # suphp enabled
    <Directory /var/www/clients/client3/web19/web>
        suPHP_Engine on
        # suPHP_UserGroup web19 client3
        AddHandler x-httpd-suphp .php .php3 .php4 .php5
        suPHP_AddHandler x-httpd-suphp
    </Directory>


</VirtualHost>
[root@ww1-02 sites-enabled]# apachectl -S
[Fri Sep 10 23:06:37 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
VirtualHost configuration:
78.46.106.188:80 is a NameVirtualHost
default server gacycles.co.uk (/etc/httpd/conf/sites-enabled/gacycles.co.uk.vhost:7)
port 80 namevhost gacycles.co.uk (/etc/httpd/conf/sites-enabled/gacycles.co.uk.vhost:7)
port 80 namevhost glebegallery.com (/etc/httpd/conf/sites-enabled/glebegallery.com.vhost:7)
78.46.106.188:443 is a NameVirtualHost
default server gacycles.co.uk (/etc/httpd/conf/sites-enabled/gacycles.co.uk.vhost:75)
port 443 namevhost gacycles.co.uk (/etc/httpd/conf/sites-enabled/gacycles.co.uk.vhost:75)
wildcard NameVirtualHosts and _default_ servers:
_default_:443 ww1-02.osit.com (/etc/httpd/conf.d/ssl.conf:81)
*:8080 is a NameVirtualHost
default server ww1-02.osit.com (/etc/httpd/conf/sites-enabled/000-ispconfig.vhost:10)
port 8080 namevhost ww1-02.osit.com (/etc/httpd/conf/sites-enabled/000-ispconfig.vhost:10)
Syntax OK

I've also tried adding a default site with wildcard instead of IP address to stop the error (which it does) but it does not stop the the other sites from not picking up their correct Docuement Root locations

Thanks
Paul
Reply With Quote
Sponsored Links
  #2  
Old 11th September 2010, 09:49
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,982 Times in 3,903 Posts
Default

Quote:
NameVirtualHost has no virtualhosts error
Thats absolutely ok and not an error. It just means that you can assign SSL certificates to some of the IP addresses.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 11th September 2010, 15:22
paul_xedos paul_xedos is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Till,
Thanks for the reply. The problem is more an issue of the correct sites not being pointed to with apache not finding http://glebegallery.com and instead falling through to the lower in the alphabet site. If I add a site called default.com everything points to that. Pointing the site to the IP address does not seemed to have helped on this occasion
Thanks
Paul
Reply With Quote
  #4  
Old 12th September 2010, 18:33
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,982 Times in 3,903 Posts
Default

1) Check the DNS Records of all sites and ensure that they point to the exact same IP address that you selected for that domain in the website settings.
2) Do not mix * and IP's in the website settings on the same server. Either all websites have to use * or all websites have to use the IP.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 13th September 2010, 10:12
paul_xedos paul_xedos is offline
Junior Member
 
Join Date: Sep 2009
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Till,

Thanks for your reply. I don't know how you manage to answer so many questions but I'm very glad that you do as that was the fix.

Thanks
Paul
Reply With Quote
  #6  
Old 11th November 2011, 16:20
stevegjacobs stevegjacobs is offline
Junior Member
 
Join Date: Sep 2008
Posts: 28
Thanks: 1
Thanked 1 Time in 1 Post
Default I think this relates to my problem

I only have one site, and when i changed it from * to <ip_address>, the domain points everything to the root server file in /var/www/ instead of to the appropriate /var/www/client1/web1/web folder
Reply With Quote
  #7  
Old 11th November 2011, 18:31
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 34,586
Thanks: 792
Thanked 4,982 Times in 3,903 Posts
 
Default

This happens when apache does not find a matching vhost for the website, e.g. when the IP address that you selected for the website does not match with the IP address of the dns records. If your server is behind a router, then the dns has to point to the external IP address instead and you have to select the IP address in the website settings where your router forwards port 80 and 443 to.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Tags
namevirtualhost default

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
Change newly created site permissions bswinnerton Installation/Configuration 3 9th November 2008 20:40
added site but ispconfig doesnt created a dir dr_dbox General 6 26th June 2008 14:25
ISPConfig - Created site under wrong client jcoen HOWTO-Related Questions 2 25th March 2008 02:35
New Site Created, but DNS not working torqhost Installation/Configuration 2 1st September 2007 15:11
error accessing created site danny Installation/Configuration 1 31st December 2005 17:12


All times are GMT +2. The time now is 19:20.


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