群晖解除80/443端口占用
ZYHWJL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ssh登陆nas
sudo -i #切换至root用户
#检查端口占用情况
netstat -anp |grep 80
netstat -anp |grep 443
#能确定端口被nginx占用

cd /usr/syno/share/nginx
#文件备份
cp server.mustache server.mustache_`date +%Y%m%d`
cp DSM.mustache DSM.mustache_`date +%Y%m%d`
cp WWWService.mustache WWWService.mustache_`date +%Y%m%d`

#其中的8080、8443自行调整
sed -i "s/80/8080/g" server.mustache
sed -i "s/80/8080/g" DSM.mustache
sed -i "s/80/8080/g" WWWService.mustache

sed -i "s/443/8443/g" server.mustache
sed -i "s/443/8443/g" DSM.mustache
sed -i "s/443/8443/g" WWWService.mustache

#重启nginx
synosystemctl restart nginx
#检查nginx服务
ps -ef|grep nginx

#检查端口占用情况
netstat -anp |grep 80
netstat -anp |grep 443