【问题标题】:Apache 404 with specific port具有特定端口的 Apache 404
【发布时间】:2014-03-14 19:13:49
【问题描述】:

我有一台 LAMP 服务器,我必须使用 80 以外的端口。 我设置了“Listen 3689”,但没有删除“Listen 80”。 当我使用端口 80 时,一切正常,但当我尝试另一个端口时,我得到了 404。

有什么想法吗?

【问题讨论】:

    标签: apache http-status-code-404 port


    【解决方案1】:

    你应该用你想要的端口添加一个虚拟主机

    通常有

    <VirtualHost *:80>
    DocumentRoot /www/example1
    ServerName www.example.com
    
    # Other directives here
    
    </VirtualHost>
    

    现在你需要添加

    <VirtualHost *:3689>
    DocumentRoot /www/example1
    ServerName www.example.com
    
    # Other directives here
    
    </VirtualHost>
    

    【讨论】:

      猜你喜欢
      • 2015-11-28
      • 1970-01-01
      • 1970-01-01
      • 2014-03-26
      • 1970-01-01
      • 2018-11-10
      • 2014-12-02
      • 2012-03-26
      • 1970-01-01
      相关资源
      最近更新 更多