LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-22-2006, 08:05 AM   #16
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36

Quote:
# Virtual host myweb2.com
<VirtualHost 192.168.1.10>
DocumentRoot /var/www/html/vfile2/
ServerAdmin webmaster@myweb2.com
ServerName www.myweb.com
ServerAlias myweb2.com
ServerAlias *.myweb2.com
DirectoryIndex index2.html index.htm index.shtml
</VirtualHost>
ServerName in this should be, logically, www.myweb2.com you have it as the default domain so this virtual host will never be accessable as is.

DNS, add the virtual host domain names to the dns server, as authoritive entries, so that your local domain name service will recognise that it is the only name server with these names and start listening for them in dns requests.
If the virtual host's names are not registered, then there is no way to access them by name.
you have a dns server, you can add them, then they are registered.
 
Old 10-24-2006, 03:43 AM   #17
frankkky
Member
 
Registered: Sep 2006
Posts: 52

Original Poster
Rep: Reputation: 15
yeah Jaqui, i corrected the mistake on the "www.myweb2.com". and now proceeded to the dns server (which is on a different machine) - the w2k3 machine to add the vhosts 1,2, and 3. but still cannot get the http://myweb2.com, and http://myweb3.com via the browser.
i just want you to confirm if i did the configuration fine:
i went to dns managemant console and on the forward lookup zone i right clicked and added new zones (myweb1.com, myweb2.com, and myweb3.com) and then assigned them the ip address of the apache server
 
Old 10-26-2006, 08:15 AM   #18
Jaqui
Member
 
Registered: Jan 2006
Location: Vancouver BC
Distribution: LFS, SLak, Gentoo, Debian
Posts: 291

Rep: Reputation: 36
Sounds right to me, but I have never used any MS server software so I can't really say for sure.

dns does take some time before the names replicate out and start working.

you can browse to the ipnumber/[vhost folder] and get the right page displayed?
if not, then your system isn't serving the content from the vhost folder, which could be a permissions issue, the user and group for them has to be the same as apache is using.
the permissions for active webserver folders are usually 644, owner has read and write permission, everyone else can read only.
 
Old 11-01-2006, 08:07 AM   #19
frankkky
Member
 
Registered: Sep 2006
Posts: 52

Original Poster
Rep: Reputation: 15
yes when i browse to these vhost1 folder and vhost2 folder and double click the myweb2 and myweb3 html file i can see them in the browser. again regarding the folder permission, presently they are 755, i did chang them to 644 as you said but got 'permission denied' error when i clicked the html files. so have to revert back to 755. more help please
 
Old 11-16-2006, 10:31 PM   #20
vimalkumar_k
LQ Newbie
 
Registered: Nov 2006
Posts: 14

Rep: Reputation: 0
Talking

Hey guys.. i am a newbie in apache...
but still... when u use name based hosting on a local machine... I think u got to refer it in /etc/hosts file.. isnt it??

Like.. if u create a tag in httpd.conf like this:

<VirtualHost mysite.example.com:80>
DocumentRoot /var/www/mysite
ServerName mysite.example.com
# and many other entries here .....
</VirtualHost>

then... what i do is edit /etc/hosts file and enter :

<ip of the machine> mysite.example.com mysite

in a new line... and restart httpd service (since conf. has changed)... Then the sitemysite.example.com works fine... well.., only on local machine...

If the site should be accessed everywhere on the network.., i think the same process should be done in server...

Wt u say?? Is this right... or am i completely wrong??
Plz reply.. that way.. i could also learn!!

Ok?
Vimal.
 
  


Reply

Tags
apache



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 and virtual host voip_tech_2004 Red Hat 1 04-12-2006 11:36 AM
Apache - Name virtual host tisource Linux - Networking 5 03-03-2006 02:52 AM
Apache 2 Virtual host eckertc1 Linux - Software 6 03-22-2005 09:58 PM
Apache 2.0 Virtual Host? w0lfeyes Linux - Networking 1 05-03-2004 03:09 PM
apache and virtual host diverge Linux - Networking 2 01-11-2004 02:45 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 12:01 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration