By joginayak
I followed the virtual hosts tutorial and set up apache for my domain name aditidentalcare.com. The website was loading perfectly but now I am suddenly getting this error.
Forbidden - You don’t have permission to access / on this server.
I don’t understand why!
Here is the aditidentalcare.com.conf
<VirtualHost *:80> ServerAdmin jogi@smashingpixels.in ServerName aditidentalcare.com ServerAlias www.aditidentalcare.com DocumentRoot /var/www/html/sites/aditidentalcare.com/public_html ErrorLog /error.log CustomLog /access.log combined </VirtualHost>
The permission for public_html is set to 750 and the owner:group is jogi:www-data
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Accepted Answer
You need to use chmod
755 instead of 750 on directories. Using 750 equates to users having read, write, and execute, groups having read and execute, and finally, world (i.e your visitors) having absolutely zero access, thus they will be forbidden from accessing and/or viewing the contents.
i deploy Centos; try command in terminal chown -R apache:apache /var/www/html/* it works; or if you using WINscp or FTP try CHMOD directory to 0775 and check Recrusively, files will automatic 0644, but i know it takes long time and wasted your time.
if you were using a wordpress site, it could have quite possibly been caused by a corrupt .htaccess file. the simple fix is to resave permalinks twice in order to regenerate .htaccess.
you might be seeing the below error messages:
br, tom
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.