DeveloperSide.NET Forums
September 20, 2019, 10:52:07 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Problem with Apache2 and virtual hosts  (Read 15238 times)
0 Members and 1 Guest are viewing this topic.
dvruiz
Member
*
Posts: 1


View Profile
« on: September 16, 2004, 03:14:34 PM »

I installed and configured Apache2 on a RedHat 9.0 box according to the step-by-step guide by devside. The main webserver works fine in both http and ssl, but when I added virtual hosts which are ip based I get "The page cannot be displayed" message. Listed below is the virual host section of the server's httpd.conf.

Thank you

### Section 3: Virtual Hosts
#
# VirtualHost: If you want to maintain multiple domains/hostnames on your
# machine you can setup VirtualHost containers for them. Most configurations
# use only name-based virtual hosts so the server doesn't need to worry about
# IP addresses. This is indicated by the asterisks in the directives below.
#
# Please see the documentation at
# <URL:http://httpd.apache.org/docs-2.0/vhosts/>
# for further details before you try to setup virtual hosts.
#
# You may use the command line option '-S' to verify your virtual host
# configuration.

#
# Use name-based virtual hosting.
#
#NameVirtualHost *:80

#
# 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 *:80>
#    ServerAdmin webmaster@dummy-host.example.com
#    DocumentRoot /www/docs/dummy-host.example.com
#    ServerName dummy-host.example.com
#    ErrorLog logs/dummy-host.example.com-error_log
#    CustomLog logs/dummy-host.example.com-access_log common
#</VirtualHost>

# Virtual host jgmsinc
<VirtualHost xxx.xxx.xxx.xxx>
    DocumentRoot /home/website1/www/html
    ServerAdmin dvruiz@website1.com
    ServerName www.website1.net
#        ServerAlias website1.com
    <Directory />
         Options            FollowSymLinks
         AllowOverride      None
    </Directory>

    <Directory "/home/website1/www/html">
         Options            Indexes FollowSymLinks
         AllowOverride      None
         Order              allow,deny
         Allow              from all
    </Directory>


</VirtualHost>

# Virtual host website2
<VirtualHost xxx.xxx.xxx.xxx>
    DocumentRoot /home/website2/www/html
    ServerAdmin dvruiz@website2.com
    ServerName xxx.xxx.xxx.xxx
</VirtualHost>
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: September 16, 2004, 09:06:42 PM »

You can start here...
http://httpd.apache.org/docs-2.0/vhosts/
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #2 on: September 19, 2004, 07:21:44 PM »

You can also search these forums for "VirtualHost" to get an example.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!