Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

330
Views
What causes the default Apache page to open up when the Moodle site is loaded

My site www.site.com loads apache2 'It works' page instead of the expected home page of moode which is located at /var/www/html/moodle. There is an index file index.php inside moodle directory but it is not taken by default. If I go to www.site.com/moodle the site homepage comes. The configuration file /etc/apache2/sites-available/site.conf is enabled. How to solve this?

<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>
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

This can be solved by changing the line

DirectoryIndex index.php

to

DirectoryIndex index.php /moodle/index.php

in the file /etc/apache2/sites-available/site.conf.

Source : https://httpd.apache.org/docs/2.4/mod/mod_dir.html

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!