Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

At my work I had been working on one web application with apche on opensuse listening to one IP, lets say 123.123.123.200. Now we are adding to differet web application to same machine. both have their own SSL certificates. SSL working fine on one website which was already running there before. Now my apache vhosts.conf look like as follows

Listen 80
Listen 443

NameVirtualHost 123.123.123.200:80
NameVirtualHost 123.123.123.200:443
<VirtualHost 123.123.123.200:443>
    DocumentRoot /srv/www/domainone
    ServerName      domainone
    SSLEngine On
    SSLCertificateFile /srv/cert/domainone.crt
    SSLCertificateKeyFile /srv/cert/domainone.key
</VirtualHost>
<VirtualHost 123.123.123.200:80>
    DocumentRoot /srv/www/domainone
    ServerName      domainone
</VirtualHost>

<VirtualHost 123.123.123.201:443>
    DocumentRoot /srv/www/domaintwo
    ServerName      domaintwo
    SSLEngine On
    SSLCertificateFile /srv/cert/domaintwo.cer
    SSLCertificateKeyFile /srv/cert/domaintwo.key
 </VirtualHost>
 <VirtualHost 123.123.123.201:80>
    DocumentRoot /srv/www/domaintwo
    ServerName      domaintwo
 </VirtualHost>

with this config I get an error when I start apache but if I disbale entries for 123.123.123.201 then apache starts fine.

What I am doing wrong here?

another thing related to same setup is that how to setup apache to listen to multiple IP. Is it under control of apache or the operating system?

Thanks

share|improve this question
    
"I get an error" Feel like sharing? –  Ignacio Vazquez-Abrams Apr 10 '12 at 4:06
    
just this Starting httpd2 (prefork) failed –  codescope Apr 10 '12 at 4:10
    
@codescope: nothing more detailed in the error log? –  Ulrich Schwarz Apr 10 '12 at 4:29
    
@UlrichSchwarz There is nothing in error_log regarding failing of server start. Is there any other place to look for failure logs? –  codescope Apr 10 '12 at 4:40
add comment

1 Answer

Looks like you've forgotten to add 123.123.123.201:80 and 123.123.123.201:443 to your NameVirtualHost stanzas.

share|improve this answer
    
"startproc: exit status of parent of /usr/sbin/httpd2-prefork: 1 - failed". I always get this error. should I start 2 instances of apache to listen to each IP? –  codescope Apr 11 '12 at 5:25
    
No. Did you tell apache to check your config before trying to start? –  Shadur Apr 11 '12 at 5:40
    
yes. i used "rcapache2 configtest" and "rcapache2 extreme-configtest". i get "Syntax: OK" in both cases. but when I restart I get above error message –  codescope Apr 11 '12 at 5:41
    
I don't understand what is wrong. I did same steps on winxp+apache and it worked without any error. –  codescope Apr 12 '12 at 6:33
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.