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:
- Enable the web station from the web services icon in control panel. This gives you Apache
- 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>
- 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>.
UPDATE: Just updated to DSM 5.0 and a few things have changed:
- /usr/syno/apache/ has moved to /etc/httpd/
- /usr/syno/etc/rc.d/S97apache-user.sh is gone, so just use ‘httpd -k stop|start|restart’
- You may need to create the folder /var/services/web/internal for httpd to restart