SS 代理使用了 443 端口会不会导致 SSL 无法配置?

2015-07-21 23:28:05 +08:00
 matrix32767
按照网上几个教程配置 NginX ,都出现这种情况:

$service nginx restart
Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' for details.

有遇到过这种情况的朋友么?会不会是因为 SS 代理用了 443 口还怎样?
8443 次点击
所在节点    问与答
13 条回复
tyhunter
2015-07-21 23:30:30 +08:00
不清楚,我的SS端口是12345,好记
XiaoxiaoPu
2015-07-21 23:34:52 +08:00
一个端口只能被一个程序绑定,ss 占用了 nginx 自然用不了了
maemual
2015-07-21 23:35:01 +08:00
既然你不准备看看错误信息,那我只能估计是443端口被占用了。
defia
2015-07-21 23:37:17 +08:00
两程序,监听的都是同一个tcp端口,那后面的肯定起不来啊。。。
49
2015-07-21 23:49:00 +08:00
不会,我就是把SSL,ss,ssh放在一个端口的。
关键词 端口复用
matrix32767
2015-07-21 23:49:54 +08:00
貌似并不是端口问题...
matrix32767
2015-07-21 23:50:51 +08:00
ss 换端口之后仍有这样的问题...

$systemctl status nginx.service
* nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled)
Active: failed (Result: exit-code) since Tue 2015-07-21 11:45:00 EDT; 9s ago
Process: 671 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
Process: 538 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 679 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)
Main PID: 541 (code=exited, status=0/SUCCESS)

Jul 21 11:45:00 Trinity nginx[679]: nginx: [emerg] "listen" directive is no...24
Jul 21 11:45:00 Trinity nginx[679]: nginx: configuration file /etc/nginx/ng...ed
Jul 21 11:45:00 Trinity systemd[1]: nginx.service: control process exited, ...=1
Jul 21 11:45:00 Trinity systemd[1]: Failed to start A high performance web ...r.
Jul 21 11:45:00 Trinity systemd[1]: Unit nginx.service entered failed state.
Hint: Some lines were ellipsized, use -l to show in full.
kn007
2015-07-21 23:51:11 +08:00
@49 刚想答的,我就补充一下吧,用sslh
kn007
2015-07-21 23:52:32 +08:00
提示你的配置有错啊,日志那么清楚了。
@matrix32767
matrix32767
2015-07-21 23:52:42 +08:00
- Logs begin at Tue 2015-07-21 11:41:13 EDT, end at Tue 2015-07-21 11:52:25 EDT
Jul 21 11:45:00 Trinity systemd[1]: nginx.service: control process exited, code=
Jul 21 11:45:00 Trinity systemd[1]: Failed to start A high performance web serve
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Jul 21 11:45:00 Trinity systemd[1]: Unit nginx.service entered failed state.
Jul 21 11:50:08 Trinity sshd[715]: Connection closed by 106.243.125.195 [preauth
Jul 21 11:52:17 Trinity nginx[725]: nginx: [emerg] "listen" directive is not all
Jul 21 11:52:17 Trinity nginx[725]: nginx: configuration file /etc/nginx/nginx.c
Jul 21 11:52:17 Trinity systemd[1]: nginx.service: control process exited, code=
Jul 21 11:52:17 Trinity systemd[1]: Failed to start A high performance web serve
-- Subject: Unit nginx.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit nginx.service has failed.
--
-- The result is failed.
Jul 21 11:52:17 Trinity systemd[1]: Unit nginx.service entered failed state.
kn007
2015-07-21 23:55:21 +08:00
@matrix32767 。。。会列日志,不会看?
而且还截断了,晕。。。
[emerg] "listen" directive is not allowed here
nginx配置写错了。
matrix32767
2015-07-22 00:00:16 +08:00
@kn007
多谢提醒,改好了~
kn007
2015-07-22 00:08:46 +08:00
@matrix32767 不客气

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/207368

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX