LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache Virtual Hosting on RHEL4 AS (https://www.linuxquestions.org/questions/linux-server-73/apache-virtual-hosting-on-rhel4-as-813853/)

ayazabbasi 06-13-2010 08:05 AM

Apache Virtual Hosting on RHEL4 AS
 
i am configuring a web server with multiple virtual host on RHEL4 AS but i m getting no error except the following one.but when i browse the web site it does not work even

Starting httpd: [Sun Jun 13 05:53:57 2010] [warn] NameVirtualHost *:80 has no VirtualHosts

my httpd.conf file is as follow



Use name-based virtual hosting.
#
NameVirtualHost *:80
#
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.
#

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
ServerName www.abbsi.gov.pk
DocumentRoot /var/www/html/www.abbsi.gov.pk
-- INSERT --
</VirtualHost>

<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /var/www/www.absit.gov.pk
ServerName www.absit.gov.pk
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>


is there any mistake in virtual host section if yes please guide me.

bathory 06-13-2010 08:14 AM

Hi,

Since you've have
Quote:

NameVirtualHost *:80
you need to use the same in the <Virtualhost ...> tag(s). So replace <VirtualHost *> with <VirtualHost *:80> and restart apache

Regards


All times are GMT -5. The time now is 08:51 AM.