1

i had a virtual host config for ssl in apache as follows:

<VirtualHost *:443>
DocumentRoot "/home/user/Documents/Development/oshackers-developers/website/"
ServerName oshackers.org

this config never worked. Apache show up the default page of /var/www

When i changed the config to next lines

<VirtualHost 192.168.0.3:443>
DocumentRoot "/home/user/Documents/Development/oshackers-developers/website/"
ServerName oshackers.org

apache worked and i had access to my ssl site.

why ssl needs an ip to work and cannot work for any site ?

demosthenes
  • 111
  • 1
  • 3

1 Answers1

4

If you have name-based virtual hosts enabled with the NameVirtualHost directive, then the <VirtualHost> directive must match the NameVirtualHost directive in order for apache to serve the correct content.

DerfK
  • 19,493
  • 2
  • 38
  • 54
  • Yeah, sounds like there's already another `*:443` listener in place serving `/var/www` but no `NameVirtualHost *:443` configured. – Shane Madden Jun 30 '12 at 19:30
  • yes you are right! There was no NameVirtualHost *:443 after enabled mod_ssl. i had to write this line in /etc/apache2/ports.conf. Now it is working. – demosthenes Jul 01 '12 at 14:11
  • 1
    You should accept the answer (the checkmark next to the post) since that fixed it. – SilverbackNet Jul 03 '12 at 06:35