Question

403 Forbidden Error

Posted March 29, 2020 224 views
CentOSApache

I tried doing this: https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-centos-7

I got 403 Forbidden - nginx/1.0.15 error when i accessed example.com. I tried adding directory to virtualhost but still got error 403 also changed permissions to 755. Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
1 answer

Hi @ixtambay,

The error you’ve mentioned is actually related to an Nginx setup rather than an Apache one.

Having said that, can you please post your virtual configuration file of the domain example.com so that I can let you know if there is an actual problem with it.

Additionally, in the said virtual host file, you most probably specified a an Error Log, check the error log to see why the 403 error is being generated.

Regards,
KDSys

  • After further testing. It seems that index.html opens when i use the IP address instead of example.com. What seems to be the problem with it? As for the virtual configuration:
    <VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com
    DocumentRoot “/var/www/example.com/html”
    <Directory “/var/www/example.com/html”>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    ErrorLog “/var/www/example.com/log/error.log”
    CustomLog “/var/www/example.com/log/requests.log” combined
    </VirtualHost>
    I was just given a VM. I installed httpd and I haven’t installed nginx on the server. Thanks again in advance.

Submit an Answer