Question

Forbidden You don't have permission to access this resource. Help Needed.

Posted May 13, 2021 1.1k views
UbuntuApache

Help Needed.

“Forbidden
You don’t have permission to access this resource.
Apache/2.4.41 (Ubuntu) Server at e15p3.harvardjoeapps.com Port 80”

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.

×
Submit an Answer
1 answer

Hello, @jof6453

Would you mind sharing your Apache config and the virtual host for the domain name? You can try with the following syntax:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    ServerName server_domain_name_or_IP
    <Directory /var/www/html/>
        AllowOverride All
    </Directory>

You can then save the Apache config, test for Syntax errors and restart:

  • sudo apachectl configtest

If there are no Syntax errors, restart the service

  • sudo systemctl restart apache2

Also, you can check this question which was previously asked in our community:

https://www.digitalocean.com/community/questions/forbidden-you-don-t-have-permissions-to-access-on-this-server

Hope that this helps!
Regards,
Alex

  • Thanks Alex, before I follow these steps though, I have another error now. my .ssh key which was working previously all day (and I didn’t change it) won’t let me ssh root@134.122.16.157 into my hes virtual server.

    I’m getting an error message in shell cli and my error logs that port 22 is block me now.. just randomly started.. please unblock port 22 or my computers host/IP and let me know. TY. Joseph

    • Hello, @jof6453

      You can access the droplet via the DigialOcean console and see if the ssh-key is still present in the ~/.ssh/authorised_keys file and if not you can temporary enable the Password Authentication and then add the ssh key.

      Regards,
      Alex