Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 17th March 2005, 10:43 AM
dmode's Avatar
dmode Offline
Registered User
 
Join Date: Jan 2005
Location: vega
Posts: 145
VirtualHost Examples not working

Hi,

I am trying to add an intranet for my company. I have followed the VirtualHost Examples from the Apache website. Done the necessary modifications in the httpd.conf file.

Followed the procedures below (create the directory):
--------------------------------------------------
Listen 80

# This is the "main" server running on 172.20.30.40
ServerName server.domain.com
DocumentRoot /www/mainserver

# This is the other address
NameVirtualHost 172.20.30.50

<VirtualHost 172.20.30.50>
DocumentRoot /www/example1
ServerName www.example1.com

# Other directives here ...

</VirtualHost>

<VirtualHost 172.20.30.50>
DocumentRoot /www/example2
ServerName www.example2.org

# Other directives here ...

</VirtualHost>
--------------------------------------------------

All I get is a message from squid :

The requested URL could not be retrieved

Can someone help, should I modify the hosts file? One more question: How can I limit access to only client computers on the network to the virtual domains, i.e. no access from internet?
Reply With Quote
  #2  
Old 18th March 2005, 05:03 AM
dmode's Avatar
dmode Offline
Registered User
 
Join Date: Jan 2005
Location: vega
Posts: 145
Anyone? Please help.
Reply With Quote
  #3  
Old 18th March 2005, 05:52 AM
Jman Offline
Registered User
 
Join Date: Mar 2004
Location: Minnesota, USA
Age: 27
Posts: 7,909
You have two of the same IP, which is probably not working.

How will you tell two VirtualHosts apart? IP address, hostname, or port number?

There is a config tool you can use, in the package system-config-httpd. On the menu System Settings > Server Settings > HTTP.
Reply With Quote
  #4  
Old 18th March 2005, 06:04 AM
dmode's Avatar
dmode Offline
Registered User
 
Join Date: Jan 2005
Location: vega
Posts: 145
But this is the example given by Apache (if its there then it should work right?!?)! I do however have made the configuration for only one virtual host, just as you said. My main aim is to setup two web servers on a single computer, one for hosting our website and one for intranet. When trying to connect to the virtual host, all I am getting is:

The requested URL could not be retrieved

Here it is:
----------------------------------------------
NameVirtualHost 172.20.80.2

<VirtualHost 172.20.80.2>
DocumentRoot /var/www/html
</VirtualHost>

<VirtualHost 172.20.80.2>
DocumentRoot /var/www/html/intranet
ServerName www.united.net
</VirtualHost>
----------------------------------------------

I'm desperate!
Reply With Quote
  #5  
Old 19th March 2005, 03:20 AM
psan Offline
Registered User
 
Join Date: Sep 2004
Posts: 1
Hi configure this is the example given by Apache

NameVirtualHost 172.20.30.50:80

<VirtualHost 127.0.0.1:80>
ServerName localhost
DocumentRoot /home/example1/public_html
DirectoryIndex index.htm index.html index.shtml index.php
</VirtualHost>

<VirtualHost 172.20.30.50:80>
ServerName example1
DocumentRoot /home/example1/public_html
ErrorLog /var/log/httpd/example1_error_log
CustomLog /var/log/httpd/example1_access_log common
DirectoryIndex index.htm index.html index.shtml index.php
<Directory "/home/example1/public_html">
Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


################# example2
<VirtualHost 172.20.30.50:80>
ServerName example2
DocumentRoot /home/example2/public_html
ErrorLog /var/log/httpd/example2_error_log
CustomLog /var/log/httpd/example2_access_log common
DirectoryIndex index.html index.shtml index.htm index.php
<Directory "/home/example2/public_html">
Options Indexes FollowSymLinks Includes
AllowOverride None
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Reply With Quote
Reply

Tags
examples, virtualhost, working

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
package for python examples? daviddoria Using Fedora 1 21st April 2009 03:31 AM
Examples of Ruby using SqLite? tashirosgt Programming & Packaging 0 29th March 2006 09:10 PM
.exrc File examples cdlaforc Using Fedora 0 29th August 2005 07:27 PM
VirtualHost not working correctly. Please advise. ecroskey Servers & Networking 1 4th February 2005 09:21 PM


Current GMT-time: 20:02 (Thursday, 23-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat