当加载Moodle网站时,是什么原因导致默认的Apache页面打开?

问题描述 投票:0回答:1

我的网站 www.site.com 加载apache2'它的工作'页面,而不是预期的moude的主页,它位于 /var/www/html/moodle. 有一个索引文件 index.php 但它并不是默认的。如果我到 www.site.com/moodle 网站主页来了。配置文件 /etc/apache2/sites-available/site.conf 是启用的。如何解决这个问题?

<VirtualHost *:80>
    ServerName www.site.com
    ServerAlias site.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/moodle
    DirectoryIndex index.php
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =www.site.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} 
    [END,NE,R=permanent]
</VirtualHost>
apache web-services server ubuntu-18.04 moodle
1个回答
0
投票

这可以通过修改以下一行来解决

DirectoryIndex index.php

DirectoryIndex index.php /moodle/index.php

档案中 /etc/apache2/sites-available/site.conf.

源于。https:/httpd.apache.orgdocs2.4modmod_dir.html。

© www.soinside.com 2019 - 2024. All rights reserved.