I have /var/www/html/moodle
as my website directory. When in mysite.conf
the settings are as follows:
DocumentRoot /var/www/html
DirectoryIndex index.php
mysite.com gives an Index of/
page since there is only apache's index.html
in the default location as index file.
How can I make mysite.com load /var/www/html/moodle/index.php
?
I tried giving in /etc/apache2/sites-available/mysite.conf
DirectoryIndex /moodle/index.php
With this mysite.com loads the moodle homepage, but otherindex
pages inside moodle are not loading.
How to solve this?
This can be solved by changing the line
to
in the file
/etc/apache2/sites-available/site.conf
.Source : https://httpd.apache.org/docs/2.4/mod/mod_dir.html