Connecting Tech Pros Worldwide Help | Site Map

Virtual Host not working

 
LinkBack Thread Tools Search this Thread
  #1  
Old July 7th, 2006, 11:15 AM
Newbie
 
Join Date: Jul 2006
Posts: 4
Default Virtual Host not working

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 ?
Reply
  #2  
Old July 7th, 2006, 01:52 PM
Newbie
 
Join Date: Jul 2006
Posts: 3
Default

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

:)
Reply
  #3  
Old July 7th, 2006, 02:45 PM
Newbie
 
Join Date: Jul 2006
Posts: 4
Default

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
Reply
  #4  
Old July 7th, 2006, 04:31 PM
sashi's Avatar
Expert
 
Join Date: Jun 2006
Location: Seremban, Malaysia
Age: 33
Posts: 1,630
Default

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/

Last edited by sashi; July 7th, 2006 at 04:34 PM.
Reply
  #5  
Old August 3rd, 2006, 09:27 PM
Newbie
 
Join Date: Aug 2006
Location: Sibu, Sarawak, Malaysia
Age: 24
Posts: 1
Default

How apache to run in localhost in PC
Reply
  #6  
Old August 5th, 2006, 03:26 PM
sashi's Avatar
Expert
 
Join Date: Jun 2006
Location: Seremban, Malaysia
Age: 33
Posts: 1,630
Default

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
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.