【问题标题】:SSI Not Working on Ubuntu 16.04 and Apache 2.4.18SSI 在 Ubuntu 16.04 和 Apache 2.4.18 上不起作用
【发布时间】:2017-05-13 20:21:27
【问题描述】:

我正在尝试运行 bWAPP SSI 注入课程。但是,似乎 SSI 在我的计算机上不起作用。我在 Ubuntu 16.04 上使用 PHP 5.6.30 和 Apache 2.4.18。我已将以下内容添加到 /etc/apache2/apache2.conf 但无法正常工作

<Directory /var/www/html/bWAPP/>
    Options +Includes
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml
</Directory>

将以下内容添加到/var/www/html/bWAPP/.htaccess 也不起作用

Options +Includes
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml

我已重新启动 Apache 服务器,但仍无法正常工作。 我需要做什么才能启用 SSI?

【问题讨论】:

    标签: apache .htaccess ubuntu ssi


    【解决方案1】:

    要在 Ubuntu/Apache-WebServer 上启用 ssl,您需要在命令行上执行以下步骤:

    1. a2enmod ssl
    2. a2ensite default-ssl.conf
    3. 服务 apache2 重启

    对于特定的虚拟主机,只需将 default-ssl.conf 复制到例如 bwapp.conf 并将该文件更改为如下所示

        ServerName  bwapp.youserver.com
        ServerAlias www.bwapp.yourserver.com
    
        ServerAdmin webmaster@yourserver.com
    
        DocumentRoot /var/www/html/bwapp/
    
        <Directory /var/www/html/bwapp>
                Options FollowSymLinks
                DirectoryIndex index.php
        </Directory>
    

    之后,从命令行启用这个虚拟主机

    1. a2ensite bwapp.conf
    2. 服务 apache2 重启

    祝你好运。

    【讨论】:

    • 这是关于 ssi,而不是 ssl
    猜你喜欢
    • 2017-04-07
    • 1970-01-01
    • 2016-11-27
    • 2017-07-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-03-09
    • 1970-01-01
    相关资源
    最近更新 更多