【问题标题】:Apache2 Site not found未找到 Apache2 站点
【发布时间】:2017-02-18 23:04:00
【问题描述】:

我刚刚在我的 BananaPi 上安装了带有 NextCloud、MySQL 数据库和 Apache2 的 Armbian。但我总是收到“找不到页面”错误。

这是我的 /etc/apache2/sites-available/000-default.conf

<VirtualHost *:80>
    # The ServerName directive sets the request scheme, hostname and port that
    # the server uses to identify itself. This is used when creating
    # redirection URLs. In the context of virtual hosts, the ServerName
    # specifies what hostname must appear in the request's Host: header to
    # match this virtual host. For the default virtual host (this file) this
    # value is not decisive as it is used as a last resort host regardless.
    # However, you must set it for any further virtual host explicitly.
    ServerName www.my-domain.com

    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/nextcloud

    # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
    # error, crit, alert, emerg.
    # It is also possible to configure the loglevel for particular
    # modules, e.g.
    #LogLevel info ssl:warn

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    # For most configuration files from conf-available/, which are
    # enabled or disabled at a global level, it is possible to
    # include a line for only one particular virtual host. For example the
    # following line enables the CGI configuration for this host only
    # after it has been globally disabled with "a2disconf".
    #Include conf-available/serve-cgi-bin.conf
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

<Directory /var/www/nextcloud>
Options +FollowSymlinks
AllowOverride All
</Directory>

你能帮我解决这个问题吗?

【问题讨论】:

    标签: apache virtualhost nextcloud


    【解决方案1】:

    尝试将您的 Directory 节移动到 VirtualHost

    【讨论】:

    • 现在他说:未找到 在此服务器上未找到请求的 URL /nextcloud/index.php。
    • 然后运行 ​​locahost,因为您的 DocumentRoot 已经指向 nextcloud 目录
    • 我该怎么做?服务器在 Banana Pi 上运行。
    • @Herbert89 从浏览器的 url 中删除 /nextcloud/。您已经在配置的 Directory 节中定义了该文件夹。
    • @srayhunter 我该如何解决这个问题:现在:mydomain.com/nextcloud -> mydomain.com(打开我的 Nextcloud 而不是默认的 Apache 站点)
    猜你喜欢
    • 1970-01-01
    • 2020-06-15
    • 2020-06-29
    • 2019-03-26
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多