Connecting Tech Pros Worldwide Help | Site Map

Virtual Host not working

Newbie
 
Join Date: Jul 2006
Posts: 4
#1: Jul 7 '06
I am trying to configure virtual host on linux machine.

Following lines added to httpd.conf :

##----------------------------------
NameVirtualHost 10.34.36.83:80

<VirtualHost 10.34.36.83:80>
ServerName www.lampia.net

ServerAlias scm.lampia.net
ServerAdmin webmaster@lampia.net
DocumentRoot /usr/lib/gforge/www
ErrorDocument 404 /404.php
php_value include_path ".:/usr/lib/gforge/:/usr/lib/gforge/www/include/:/etc/gforge/"
php_value magic_quotes_gpc On
php_value register_globals On
php_value default_charset "UTF-8"
#SSLEngine On
#SSLCertificateFile /etc/httpd/conf/rapidigmers.net.cert
#SSLCertificateKeyFile /etc/httpd/conf/rapidigmers.net.key
#
# LOCATION may have to be used instead of FILES for some installs
#
<Location /projects>
ForceType application/x-httpd-php
</Location>
<Location /users>
ForceType application/x-httpd-php
</Location>
DirectoryIndex index.php
</VirtualHost>

##----------------------------

Now if I access Url http://10.34.36.83 then it works properly.

But when I try to acces it with Url http://www.lampia.net , It does not work.

Any expert suggessitions ?
Newbie
 
Join Date: Jul 2006
Posts: 3
#2: Jul 7 '06

re: Virtual Host not working


Hi,

You need to check whether your hosts file on your PC as well as hosts on Apache server is updated with new virtual hostname. It should work

:)
Newbie
 
Join Date: Jul 2006
Posts: 4
#3: Jul 7 '06

re: Virtual Host not working


Quote:

Originally Posted by byadwad

Hi,

You need to check whether your hosts file on your PC as well as hosts on Apache server is updated with new virtual hostname. It should work

:)


Can you exactly tell me what entry to make in my linux host file /etc/hosts for the above fonfiguration... Currently my file has following entries in that file :
##------
127.0.0.1 localhost.localdomain localhost
10.34.36.83 rapidigmer.rapidigmerdomain rapidigmer
##------

And I dont think making entry in my PC's host file will make sense, because I can not go and make changes to everybody's PC who want to access it.

Thanks in advance
sashi's Avatar
Expert
 
Join Date: Jun 2006
Location: Seremban, Malaysia
Posts: 1,630
#4: Jul 7 '06

re: Virtual Host not working


Hi Nilesh,

well.. host file entry on the client side does make sense provided if your running your own primary DNS server.. :)

first of all is named deamon (DNS Service) started? secondly, have create the forward and reverse zone files respectively?

pls refers to the below link.. very useful when it comes to setting up linux based web server.. goof luck my fren.. :)

http://www.linuxhomenetworking.com/wiki/
Newbie
 
Join Date: Aug 2006
Location: Sibu, Sarawak, Malaysia
Posts: 1
#5: Aug 3 '06

re: Virtual Host not working


How apache to run in localhost in PC
sashi's Avatar
Expert
 
Join Date: Jun 2006
Location: Seremban, Malaysia
Posts: 1,630
#6: Aug 5 '06

re: Virtual Host not working


Hi Junkiet,

you can the apache installer from apache website.. download the .msi installer version which is bundled for windows based pc's.. follow the default settings during the installation..

once installation is completed.. restart your pc.. you will be able to access you freshly installed web server by typing http://localhost at the address bar..

http://www.apache.org
Reply