Hello,
After having system issues for the past couple of days I decided to reinstall my OS (CentOS), which also involves resintalling Moodle again (this is the third time I have to do this). I followed the instructions according to this link: https://www.hugeserver.com/kb/how-install-moodle-centos-7/. The problem is when I go to my URL I'm getting the 403 Forbidden message that says the following:
You don't have permission to access / on this server.
My domain in currently pointed at /var/www/html/learning (I renamed the moodle directory to learning).
Here are the current permissions for /var/www/ and /var/www/html
/var/www/ apache:apache 755
/var/www/html/ apache:apache 755
/var/www/html/learning apache:apache 777
Here is the virtual host configuration in my httpd.conf file.
<VirtualHost *:80>
DocumentRoot "/var/www/html/learning"
ServerName mydomain.com
<Directory "/var/www/html/learning">
allow from all
Options None
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
DocumentRoot "/var/www/html/learning"
ServerName mydomain.com
<Directory "/var/www/html/learning">
allow from all
Options None
Require all granted
</Directory>
SSLCertificateFile /etc/letsencrypt/live/mydomain.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateChainFile /etc/letsencrypt/live/mydomain.com/chain.pem
</VirtualHost>
</IfModule>
Please help.