DeveloperSide.NET Forums
February 24, 2020, 11:36:19 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
  Home Help Search Login Register  
  Show Posts
Pages: [1]
1  DeveloperSide.NET / Building a Web Server, for Linux / Problem with Apache2 and virtual hosts 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>
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!