- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unauthorized access to sensitive files
Hello, i installed a new Magento 2.3 on a new machine and i am getting this Warning
I Already tried to set Permissions and etc, does anyone know the correct way to do this?
Your web server is set up incorrectly and allows unauthorized access to sensitive files. Please contact your hosting provider.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
@eCom_Microware You may be running your website outside of the Pub folder. Document root for your website in your virtual host must be pointing to pub folder. This must fix your issue. Below URL can help you in setting the same.
https://devdocs.magento.com/guides/v2.3/install-gde/tutorials/change-docroot-to-pub.html
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
My website is in /var/www/html
but i will take a look on it
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
@eCom_Microware Setting it to pub will fix your issue.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
My 000-default.conf
contain this
<Directory /var/www/html> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
@eCom_MicrowareYour setting should look like below. Please follow the setting provided by Magento (URL) in earlier post.
<Directory /var/www/html/pub> Options Indexes FollowSymLinks AllowOverride All Require all granted </Directory>
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
I already set this config, and restarted apache, the error doesnt disapper
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
@eCom_MicrowareI hope you create the cache as well.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
I already cleared the cache, could you please be more specified??
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Re: Unauthorized access to sensitive files
Do you have only 1 website on your server and this is why you have updated the default.conf? Can you confirm that changes are reflected and your Magento is running from 'pub' folder?
Another thing to check if you have .htaccess available in 'app' folder. Many of time during code upload / copy / paste .htaccess file get disappears.
Problem solved? Please give 'Kudos' and accept 'Answer as Solution'.
Problem solved?Please give 'Kudos' and accept 'Answer as Solution'.