Secure Reverse Proxy

Post your questions about Web Server usage and Apache + PHP + MySQL/SQLite web applications.
Post Reply
MickyGX
Starting out
Posts: 11
Joined: Wed Feb 25, 2015 4:11 am

Secure Reverse Proxy

Post by MickyGX »

Hi there,

I have created SSL certs for my domain name and all sub-domains using https://www.sslforfree.com/ and they appear to be working fine. I am now trying to set up access to my various programs using the relevant sub domain. The one I am trying to sort first is SabNzbd and have the domain sabnzbd.mydomain.com.
I have the following in my httpd-vhosts.conf file:

Code: Select all

<VirtualHost *:80>
    ServerAdmin admin@mydomain.com
    DocumentRoot "/share/Web/sabnzbd.mydomain.com"
    ServerName sabnzbd.mydomain.com
    ServerAlias www.sabnzbd.mydomain.com
	ProxyPreserveHost On
        ProxyRequests Off
        ProxyVia Off
        <Location />
                Order deny,allow
                ProxyPass http://127.0.0.1:8282/
                ProxyPassReverse http://127.0.0.1:8282/
        </Location>
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>

    ErrorLog "/share/Web/sabnzbd.mydomain.com/logs"
    CustomLog "/share/Web/sabnzbd.mydomain.com/logs" common
</VirtualHost>

Listen 443

<VirtualHost *:443>
    ServerAdmin admin@mydomain.com
    DocumentRoot "/share/Web/sabnzbd.mydomain.com"
    ServerName sabnzbd.mydomain.com
	ServerAlias www.sabnzbd.mydomain.com
	SSLEngine on
	SSLCertificateFile /etc/ssl/certs/certificate.crt
	SSLCertificateKeyFile /etc/ssl/private/private.key
	SSLCertificateChainFile /etc/ssl/certs/ca_bundle.crt
	SSLCipherSuite      ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
	SSLHonorCipherOrder on
	ProxyPreserveHost On
        ProxyRequests Off
        ProxyVia Off
        <Location />
                Order deny,allow
                ProxyPass https://127.0.0.1:8243/
                ProxyPassReverse https://127.0.0.1:8243/
        </Location>
        <Proxy *>
                Order deny,allow
                Allow from all
        </Proxy>
    ErrorLog "/share/Web/sabnzbd.mydomain.com/logs"
    CustomLog "/share/Web/sabnzbd.mydomain.com/logs" common
</VirtualHost>
When I try to access http://sabnzbd.mydomain.com everything works as it should, however, when I try to access https://sabnzbd.mydomain.com I get:

Code: Select all

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at admin@mydomain.com to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Apache Server at sabnzbd.mydomain.com Port 443
If I then add the secure port to the end of the address ie https://sabnzbd.mydomain.com:8243 it works fine.

I have been trying to get this working now for several weeks and read and tried just about everything I can to make this work with Apache. I have seen posts where this is working with Nginx but I would prefer to continue to use Apache.

Any suggestions anyone?
Last edited by MickyGX on Tue Feb 13, 2018 2:19 am, edited 1 time in total.
MickyGX
Starting out
Posts: 11
Joined: Wed Feb 25, 2015 4:11 am

Re: Secure Reverse Proxy

Post by MickyGX »

I've managed to resolve the problem :). All appear to be working now
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: Secure Reverse Proxy

Post by schumaku »

MickyGX wrote:I've managed to resolve the problem :). All appear to be working now
Some insight might be interesting for community memebrs and future readers.
Post Reply

Return to “Web Server & Applications (Apache + PHP + MySQL / SQLite)”