I need help setting this up. It almost works but not quite. Instead of taking me to https://mydomain.com/sabnzbd it goes to https://localhost:9090/sabnzbd

Machine 1 = Windows 8.1 with Sabnzbd https://localhost:9090 (SSL)
Local IP 10.1.1.10
Machine2 = Ubuntu 14.04 Server with Apache
Local IP 10.1.1.15
Both Machines on same external IP

a2enmod proxy
a2enmod proxy_http
a2enmod headers
a2enmod rewrite
a2enmod ssl

sites-enabled = 000-default.conf | default-ssl.conf | servername.conf

000-default.conf

<VirtualHost *:80>
   Redirect permanent / https://mydomain.com/
</VirtualHost>   

default-ssl.conf

<VirtualHost _default_:443>
   Header always add Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"
   ProxyRequests Off
   ProxyPreserveHost On
   AllowEncodedSlashes NoDecode
  <Location /sabnzbd>
    order allow,deny
    allow from all
    ProxyPass http://mydomain.com:9090/sabnzbd
    ProxyPassReverse http://mydomain.com:9090/sabnzbd
  </Location>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/mycert.crt
SSLCertificateKeyFile /etc/apache2/ssl/mykey.key
</VirtualHost>

servername.conf

ServerName mydomain.com

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

If you have port forwarding set up properly for your network so that requests to port 80 and 443 are routed to machine 2 and those for port 9090 are routed to machine 1 and your domain is pointed properly this should work as you expect. If you are running this on a home network, there is a very good chance that ports 80 and possibly 443 are blocked by your ISP as it’s fairly common for ISPs to block these and standard mail ports.

Submit an Answer