Apache2 VirtualHost Configuration with SSL

Posted by Peter on Stack Overflow See other posts from Stack Overflow or by Peter
Published on 2010-04-01T13:21:09Z Indexed on 2010/04/01 13:23 UTC
Read the original article Hit count: 816

Filed under:
|
|
|

Hello!
I'm new here and I have a strange problem which needs to be solved. Previously I searched in the whole forum and I've read all of related questions but I didn't find solution to my question.

We have two servers and a firewall computer.
On the Server#1 there is an Apache 2.2 web server and it forwards the incoming traffic to the appropriate ports, to our subdomains by its virtual host configuration (Apache, Tomcat, IIS, Server#2 and so on).

We recently bought an SSL certificate to protect one of our subdomain. I successfully installed and configured the certificate into the Apache and it works flawlessly within our local network. Our Kerio Winroute Firewall is configured to permit https traffic and it is translated to Server#1.

But all of our subdomains are unavailable from outside (http & https too). Web browser shows "Failed to connect" message.

Now, I enclose some parts from our httpd.conf and httpd-vhosts.conf file.

httpd.conf

ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"
Listen 80
ServerName dev.mydomain.hu:80
DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_connect_module modules/mod_proxy_connect.so
LoadModule proxy_http_module modules/mod_proxy_http.so
LoadModule rewrite_module modules/mod_rewrite.so
LoadModule ssl_module modules/mod_ssl.so

Include conf/extra/httpd-vhosts.conf

<IfModule ssl_module>
SSLMutex default
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
SSLSessionCache none
</IfModule>

httpd-vhosts.conf

NameVirtualHost *:80
NameVirtualHost *:443
Listen 443

<VirtualHost *:80>
   DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
   ServerName localhost
</VirtualHost>

#-------EXCHANGE SERVER--------
<VirtualHost *:80>
ServerName intra.mydomain.hu

ProxyRequests Off   
ProxyVia On

ProxyPass / http://myserver:8080/
ProxyPassReverse / http://myserver:8080/

<Proxy *:80>
    Order deny,allow
    Allow from all
</Proxy>

<Location />
    Order allow,deny
    Allow from all
</Location>

ErrorLog "c:/Program Files/Apache Software Foundation/Apache2.2/logs/exchange.log"
CustomLog "c:/Program Files/Apache Software Foundation/Apache2.2/logs/exchange_cust.log" common
LogLevel info
</VirtualHost>

#--------FITNESSE SERVER-------
<VirtualHost *:80>
ServerName test.mydomain.hu

ProxyRequests Off
<Proxy *:80>
    Order deny,allow
    Allow from all
</Proxy>

ProxyPass / http://myserver:8004/
ProxyPassReverse / http://myserver:8004/

<Location />
    AuthType Basic
    AuthName "FitNesse"
    AuthUserFile "C:/Program Files/Apache Software Foundation/Apache2.2/auth/password"
    AuthGroupFile "C:/Program Files/Apache Software Foundation/Apache2.2/auth/pwgroup"
    require group Users

    Order allow,deny
    Allow from all
</Location>

ErrorLog "c:/Program Files/Apache Software Foundation/Apache2.2/logs/fitnesse.log"
CustomLog "c:/Program Files/Apache Software Foundation/Apache2.2/logs/fitnesse_cust.log" common
LogLevel info
</VirtualHost>

#----WIKI SERVER-----(SSL)-
<VirtualHost *:80 *:443>

ServerName wiki.mydomain.hu
ServerAlias wiki.mydomain.hu

SSLEngine On
SSLCertificateFile "C:/Program Files/Apache Software Foundation/Apache2.2/cert/certificate.cer"
SSLCertificateKeyFile "C:/Program Files/Apache Software Foundation/Apache2.2/cert/wiki.itkodex.hu.key"

ProxyRequests Off
<Proxy *:80>
    Order deny,allow
    Allow from all
</Proxy>

ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/

ErrorLog "c:/Program Files/Apache Software Foundation/Apache2.2/logs/wiki.log"
CustomLog "c:/Program Files/Apache Software Foundation/Apache2.2/logs/wikicust.log" common
LogLevel info
</VirtualHost>

Because this wiki is a JSPWIKI web application, runs on Apache Tomcat therefore there is no "DocumentRoot" parameter in the VirtualHost.

Could anybody please help me, to solve this issue, or what should I modify in the configuration?

Thanks in advance!
Peter

© Stack Overflow or respective owner

Related posts about apache2

Related posts about https