Apache SSL through Virtualhosts (XAMPP)

Discussion in 'Apache' started by shlant, Jul 18, 2013.

  1. #1
    Hi All,

    I am trying to get Jenkins working with apache SSL. Here is the end goal:

    Jenkins = port 8080

    build.example.com -> localhost:8080 (http) -> localhost:8080 (https)

    Currently, when I go to build.example.com, it sends me to localhost (https) (not on the Jenkins server).

    Here is my httpd-virtualhost.xml:

    <VirtualHost *:80>
        ServerName build.example.com
     
        Redirect permanent / https://localhost:8080/
    </VirtualHost>
     
    <VirtualHost _default_:443>
      ServerName build.example.com
     
      SSLEngine On
      SSLCertificateFile    /Applications/XAMPP/xamppfiles/etc/ssl.crt/server.crt
      SSLCertificateKeyFile /Applications/XAMPP/xamppfiles/etc/ssl.key/server.key
     
      ProxyRequests     Off
      ProxyPass         /  https://localhost:8080/
      ProxyPassReverse  /  https://localhost:8080/
      ProxyPassReverse  /  https://build.example.com/
      <Proxy http://localhost:8080/*>
        Order allow,deny
        Allow from all
      </Proxy>
      ProxyPreserveHost on
    </VirtualHost>
    
    Code (markup):

    Here is what is uncommented in httpd.conf (that is relevant):

    LoadModule proxy_module modules/mod_proxy.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 /Applications/XAMPP/etc/extra/httpd-vhosts.conf
     
    Include /Applications/XAMPP/etc/extra/httpd-ssl.conf
    
    Code (markup):
    httpd-ssl.conf is all default

    I know the firewall/DNS rules for build.example.com are correct

    I have tried so many different techniques trying to get this to work, and at this point I think I am just confusing myself further.

    Let me know if you need more info.

    Any insight would be greatly appreciated!

    Thanks

    Marcus
     
    shlant, Jul 18, 2013 IP