LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 06-13-2010, 09:05 AM   #1
ayazabbasi
LQ Newbie
 
Registered: Aug 2008
Posts: 4

Rep: Reputation: 0
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.
 
Old 06-13-2010, 09:14 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,959

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
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
 
  


Reply

Tags
apache2conf


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache virtual hosting soroccoheaven Linux - Server 1 11-26-2008 02:28 AM
apache virtual hosting msound Linux - Networking 3 09-14-2005 07:09 PM
Apache 2.x Virtual Hosting vbfischer Linux - Software 3 04-21-2005 06:17 PM
Apache and Virtual Hosting gcobb Fedora 4 10-29-2004 01:10 AM
Apache Virtual Hosting kmac Linux - General 2 04-12-2001 11:23 PM


All times are GMT -5. The time now is 06:31 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration