Reverse proxy SSL

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Reverse proxy SSL

Postby saitoh183 » 11. June 2016 07:49

Im trying to figure what must i do to my conf file in order to sort out ssl.

Goal:
HTTP to HTTPs...basically you type domain.com and you are redirected to https://domain.com . I would create URL forward with simple names that would point to reverse proxy URL. I dont know if i can do a forward from http to https on zoneedit but i cant i would want something like sonarr.domain.com -> https://domain.com/sonarr/ or forward to http://domain.com/sonarr/ (which in turn would redirect to https)

SSL:
I created a Cert on StartSSL that contains domain.com and www.domain.com

ISP :
blocked port 80 / on router forwarded 8083 and 443 to my server and

Zoneedit.com :
A record = IP
Stealth URL forwarding = www.domain.com -> http://domain.com:8083

Apache:
on port 8083
SSL on 443

Conf:
Code: Select all
<VirtualHost *:8083>
RewriteEngine on
ReWriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L]
</VirtualHost>


<VirtualHost *:443>
    ServerAdmin email@email.com
    ServerName domain.com
    #ServerAlias www.domain.com
    DocumentRoot "/opt/lampp/htdocs/"
    ProxyRequests Off
    ProxyPreserveHost On
   
    SSLEngine on
    SSLCertificateFile /opt/lampp/etc/ssl.crt/2_domain.com.crt
    SSLCertificateKeyFile /opt/lampp/etc/ssl.key/private.key
    SSLCertificateChainFile /opt/lampp/etc/ssl.crt/1_root_bundle.crt
    ErrorLog "logs/domain.com-error_log"
    CustomLog "logs/domain.com-access_log" common
    <Proxy *>
        Order deny,allow
        Allow from all
    </Proxy>
    <Location /sonarr>
        ProxyPass        http://localhost:8087/sonarr connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8087/sonarr/
    </Location>
    <Location /cps>
        ProxyPass        http://localhost:8088/cps connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8088/cps/
    </Location>
    <Location /cpsfr>
        ProxyPass        http://localhost:8091/cpsfr connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8091/cpsfr/
    </Location>
    <Location /plexpy>
        ProxyPass        http://localhost:8089/plexpy connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8089/plexpy/
    </Location>
    <Location /sick>
        ProxyPass        http://localhost:8084/sick connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8084/sick/
    </Location>
    <Location /books>
        ProxyPass        http://localhost:8186/books connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8186/books/
    </Location>
    <Location /plexrequests>
        ProxyPass        http://localhost:8093/plexrequests connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8093/plexrequests/
    </Location>
    <Location /sabnzbd>
        ProxyPass        http://localhost:8085/sabnzbd connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8085/sabnzbd/
    </Location>
    <Location /deluge>
        ProxyPass        http://localhost:8081/ connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:8081/
   ProxyPassReverseCookieDomain 127.0.0.1 %{HTTP:Host}
   ProxyPassReverseCookiePath / /deluge/
   RequestHeader append X-Deluge-Base "/deluge/"
    </Location>
    <Location /web>
        ProxyPass        http://localhost:32400/web connectiontimeout=5 timeout=300
        ProxyPassReverse http://localhost:32400/web   
    </Location>
</VirtualHost>


Tested in Chrome
What works:
https://domain.com > https://domain.com/dashboard
https://domain.com/<proxy Location>

What doesnt work:
https://www.domain.com/dashboard/ -> ERR_CONNECTION_REFUSED
https://www.domain.com -> ERR_CONNECTION_REFUSED
http://domain.com -> ERR_CONNECTION_TIMED_OUT
http://www.domain.com or www.domain.com/-> ERR_SSL_PROTOCOL_ERROR (Does a Get https://domain.com:8083/ )
https://domain.com:8083/ -> ERR_SSL_PROTOCOL_ERROR

So what do i need to change to get the "what doesnt work" section to work (if possible) and to achieve my "Goal" section


Thanks
saitoh183
 
Posts: 1
Joined: 11. June 2016 07:10
XAMPP version: 5.6.15
Operating System: Unbuntu

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 41 guests