I m running a raspberry using raspbian with a apache2 webserver. I have 2 websites on this server and i can access the main directory of both websites (with index.html). i have used certbot for ssl and i m redirecting all trafic to 443. So far everything was great but then i created a sub folder on one of my webiste so i can build a php forum from scratch to learn php and mysql with mariadb. And i m getting a 404 error. I have checked the permission and to be sure it was fine :
Code: Select all
sudo chgrp www-data /var/www
Code: Select all
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
RewriteEngine on
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
DocumentRoot /var/www/example.com
<Directory /var/www/example.com>
Options -Indexes
AllowOverride all
Order allow,deny
allow from all
</Directory>
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/www.example.com/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/www.example.com/privkey.pem
SSLCertificateChainFile /etc/letsencrypt/live/www.example.com/chain.pem
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCompression off
SSLOptions +StrictRequire
SSLCipherSuite *********************************************************************
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
LogLevel warn
ErrorLog ${APACHE_LOG_DIR}/www.example.com-error.log
CustomLog ${APACHE_LOG_DIR}/www.example.com-access.log combined
</VirtualHost>
Hope we ll fix this
thanks for reading me
ps: last raspbian based on debian 9, update & upgrade done)