Hi Tonu,

I myself am a newbie so don't take my words as gospel, but it looks like you
are getting your configuration wrong. In order to be able to access
webdev.domain.com, you must set a NameVirtualHost from what I understand.
You also haven't specified a document root for webdev which you should.

It should be like this:

NameVirtualHost *:80

<VirtualHost *:80>
        ServerSignature email
DirectoryIndex  index.php index.html index.htm index.shtml
  LogLevel  warn
  HostNameLookups off
        ServerName webdev.domain.com
        DocumentRoot <this is missing as well in your config>
</VirtualHost>

You should probably read up on NamedVirtualHosts from this link:
http://httpd.apache.org/docs/2.2/vhosts/

Sorry if this wasn't of help (or was wrong). Like I said I am a newbie
myself :)

All the best.

On Tue, Nov 2, 2010 at 10:33 PM, Tonu Mikk <tm...@umn.edu> wrote:

> 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.comwith 
> 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