V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
matrix32767
V2EX  ›  问与答

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

  •  
  •   matrix32767 · 2015-07-21 23:28:05 +08:00 · 8454 次点击
    这是一个创建于 3413 天前的主题,其中的信息可能已经有所发展或是发生改变。
    按照网上几个教程配置 NginX ,都出现这种情况:

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

    有遇到过这种情况的朋友么?会不会是因为 SS 代理用了 443 口还怎样?
    13 条回复    2015-07-22 00:08:46 +08:00
    tyhunter
        1
    tyhunter  
       2015-07-21 23:30:30 +08:00
    不清楚,我的SS端口是12345,好记
    XiaoxiaoPu
        2
    XiaoxiaoPu  
       2015-07-21 23:34:52 +08:00
    一个端口只能被一个程序绑定,ss 占用了 nginx 自然用不了了
    maemual
        3
    maemual  
       2015-07-21 23:35:01 +08:00
    既然你不准备看看错误信息,那我只能估计是443端口被占用了。
    defia
        4
    defia  
       2015-07-21 23:37:17 +08:00
    两程序,监听的都是同一个tcp端口,那后面的肯定起不来啊。。。
    49
        5
    49  
       2015-07-21 23:49:00 +08:00 via Android
    不会,我就是把SSL,ss,ssh放在一个端口的。
    关键词 端口复用
    matrix32767
        6
    matrix32767  
    OP
       2015-07-21 23:49:54 +08:00
    貌似并不是端口问题...
    matrix32767
        7
    matrix32767  
    OP
       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
        8
    kn007  
       2015-07-21 23:51:11 +08:00
    @49 刚想答的,我就补充一下吧,用sslh
    kn007
        9
    kn007  
       2015-07-21 23:52:32 +08:00
    提示你的配置有错啊,日志那么清楚了。
    @matrix32767
    matrix32767
        10
    matrix32767  
    OP
       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
        11
    kn007  
       2015-07-21 23:55:21 +08:00
    @matrix32767 。。。会列日志,不会看?
    而且还截断了,晕。。。
    [emerg] "listen" directive is not allowed here
    nginx配置写错了。
    matrix32767
        12
    matrix32767  
    OP
       2015-07-22 00:00:16 +08:00
    @kn007
    多谢提醒,改好了~
    kn007
        13
    kn007  
       2015-07-22 00:08:46 +08:00
    @matrix32767 不客气
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   954 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 22:40 · PVG 06:40 · LAX 14:40 · JFK 17:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.