Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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 ?

share|improve this question
add comment

1 Answer

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.

share|improve this answer
    
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 1 '12 at 14:11
    
You should accept the answer (the checkmark next to the post) since that fixed it. –  SilverbackNet Jul 3 '12 at 6:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.