recently after upgrading my website to magento 2.4. develop i am not able to access my website
Error :
Not Found
The requested URL was not found on this server.
Solved! Go to Solution.
it seems like you have not configured the pub folder in Apache for your Magento installation.
you need to check the document root for your website if you are not using the pub folder.
as Magento has already recommended using PUB as a document root.
check to improve security guide for detailed information from Magento.
for that, you need to edit your Apache / Nginx configuration and update the document root.
Eg Apache2 configuration :
<VirtualHost *:80> ServerName magento2web.com DocumentRoot "/var/www/html/magento2/pub" <Directory "/var/www/html/magento2/pub"> AllowOverride All Order Allow,Deny Allow from all </Directory> ErrorLog "/var/log/apache2/magento2_error.log" CustomLog "/var/log/apache2/magento2_access.log" combined </VirtualHost> <VirtualHost *:443> ServerName magento2web.dev DocumentRoot "/var/www/html/magento2/pub" <Directory "/var/www/html/magento2/pub"> AllowOverride All Order Allow,Deny Allow from all </Directory> SSLEngine on SSLCertificateFile "/etc/ssl/cert/server.crt" SSLCertificateKeyFile "/etc/ssl/cert/server.key" ErrorLog "/var/log/apache2/magento2_error.log" CustomLog "/var/log/apache2/magento2_access.log" combined </VirtualHost>
kindly Accept as a solution if this works for you and give Kudos
it seems like you have not configured the pub folder in Apache for your Magento installation.
you need to check the document root for your website if you are not using the pub folder.
as Magento has already recommended using PUB as a document root.
check to improve security guide for detailed information from Magento.
for that, you need to edit your Apache / Nginx configuration and update the document root.
Eg Apache2 configuration :
<VirtualHost *:80> ServerName magento2web.com DocumentRoot "/var/www/html/magento2/pub" <Directory "/var/www/html/magento2/pub"> AllowOverride All Order Allow,Deny Allow from all </Directory> ErrorLog "/var/log/apache2/magento2_error.log" CustomLog "/var/log/apache2/magento2_access.log" combined </VirtualHost> <VirtualHost *:443> ServerName magento2web.dev DocumentRoot "/var/www/html/magento2/pub" <Directory "/var/www/html/magento2/pub"> AllowOverride All Order Allow,Deny Allow from all </Directory> SSLEngine on SSLCertificateFile "/etc/ssl/cert/server.crt" SSLCertificateKeyFile "/etc/ssl/cert/server.key" ErrorLog "/var/log/apache2/magento2_error.log" CustomLog "/var/log/apache2/magento2_access.log" combined </VirtualHost>
kindly Accept as a solution if this works for you and give Kudos
updated to pub folder and website is working
also i noticed that there is no index.php in magento root.
thanks