Hello,

I hope I can get some guidance from users on this list on how to configure
virtual hosts for Apache 2.2.  Eventually I would like to serve content on
port 80 and 443 on two URLs:
dsdev.domain.com and madev.domain.com, and on port 80 only on
webdev.domain.com.


Here is my scenario...

I have a server with the hostname webdev.domain.com.  This is also Fully
Qualified Domain Name assigned to an IP address (example only)
204.148.170.13.  I also have a DNS alias madev.domain.com that is assigned
to the same IP address.  I also have a second IP address 204.148.170.14 that
has a FQDN dsdev.domain.com .

I have created two network interfaces for the server and manually configured
the IP addresses.  I have also configured two virtual hosts like this:

<VirtualHost 204.148.170.13:80>
DocumentRoot "/var/www/html/madev"
ServerName madev.domain.com
<Directory "/var/www/html/madev">
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

<VirtualHost 204.148.170.14:80>
DocumentRoot "/var/www/html/dsdev"
ServerName dsdev.domain.com
<Directory "/var/www/html/dsdev">
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

The default Virtual Host is configured like this:
<VirtualHost *:80>
  ServerSignature email
DirectoryIndex  index.php index.html index.htm index.shtml
  LogLevel  warn
  HostNameLookups off
ServerName webdev.domain.com
</VirtualHost>

Currently I am getting an error when I try to access webdev.domain.com with
Firefox saying "Oops! This link appears to be broken", and I don't see an
error about this in the error log.

My first question is how can I serve content on port 80 on webdev.domain.com?
 When I reference the VirtualHost for webdev by specifying an IP address:
<VirtualHost 204.148.170.13:80>, I get a warning when starting Apache
"VirtualHost 204.148.170.13:80 overlaps with VirtualHost 204.148.170.13:80,
the first has precedence, perhaps you need a NameVirtualHost directive".

Secondly, I am not sure how to configure the madev and dsdev virtual host
directives to listen to port 443? When I change my Virtual Host to the
following, I am able to get to the site by simply going to
http://madev.domain.com.

<VirtualHost 128.101.172.14:80 128.101.172.14:443>
DocumentRoot "/var/www/html/madev"
ServerName dsdev.oed.umn.edu
SSLEngine on
SSLCertificateKeyFile /etc/httpd/ssl.key/madev.domain.com.key
SSLCertificateFile /etc/httpd/ssl.crt/server.csr
SSLCertificateChainFile /etc/httpd/ca_bundle/madev_domain_com_interm.cer
<Directory "/var/www/html/madev">
AllowOverride All
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
</Directory>
</VirtualHost>

Any pointers is appreciated.

Thank you,

Tonu

Reply via email to