-
-
Save Stenudd/434195a35699bc165890a12d3f12dbfd to your computer and use it in GitHub Desktop.
Free ports 80 and 443 on Synology NAS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# Save this script in one of your shares and schedule it to run as root at boot | |
# through Control Panel -> Task Scheduler | |
# DSM upgrades will reset these changes, which is why we schedule them to happen automatically | |
# Set the variables below if you want to customise the ports which DSM will listen on instead | |
# NOTE: These ports are used for some services, e.g. Photo Station | |
HTTP_PORT=81 | |
HTTPS_PORT=444 | |
sed -i "s/^\( *listen .*\)80/\1$HTTP_PORT/" /usr/syno/share/nginx/*.mustache | |
sed -i "s/^\( *listen .*\)443/\1$HTTPS_PORT/" /usr/syno/share/nginx/*.mustache |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment