rebelpeon.com

10Jun/122

Proxy Other Ports to Port 80 on Synology

Ok, so you want to be able to access services running on a random port on your Synology NAS over standard ports (80 and 443).  To do that, you need to do the following items:

  1. Enable the web station from the web services icon in control panel.  This gives you Apache
  2. Add the following lines to the end of /usr/syno/apache/conf/httpd.conf-user (you must re-do this after doing a DSM update).  Replace <accessPath> with a name, and <port> with the port it is running on.  For example, http://localhost:8080/party.
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    ProxyRequests Off
    ProxyPreserveHost On
    
    <Location /<accessPath>>
    ProxyPass http://localhost:<port>/<accessPath>
    ProxyPassReverse http://localhost:<port>/<accessPath>
    </Location>
    
  3. Restart apache with "/usr/syno/etc.defaults/rc.d/S97apache-user.sh restart"

Just make sure whatever service you are doing this with has a base url of <accessPath>.

Filed under: synology Leave a comment
Comments (2) Trackbacks (0)
  1. I’m trying to set this up so I can access SABnzbd which is running on the NAS from outside my network. I only want to have 80 or 443 open, but SABnzbd runs on 8080.

    I added the code above to my httpd.conf-user file, but when I try to load the page I get, “Sorry, the page you are looking for is not found.”

    Any ideas?

  2. The following works for me.

    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_http_module modules/mod_proxy_http.so
    ProxyRequests Off
    ProxyPreserveHost On


    ProxyPass http://localhost:8080/sabnzbd
    ProxyPassReverse http://localhost:8080/sabnzbd


Leave a comment

No trackbacks yet.