Client denied by server when configuring a new vhost

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Application configuration

bnsupport ID: 50b0e807-edf9-ba90-9405-01efae38e3ff

bndiagnostic output:

? Apache: Found possible issues
? Resources: Found possible issues
https://docs.bitnami.com/general/apps/wordpress/troubleshooting/debug-errors-apache/

bndiagnostic failure reason: The guides were connected to my issue, but didn’t help

Description:
I’m recreating an issue I’ve had with a brand new LAMP instance on LightSail.

I create the instance, log in and create a single vhost file per these directions:
https://docs.bitnami.com/ibm/infrastructure/lamp/administration/redirect-custom-domains/

But as soon as I do, I get 403 Forbidden on the website, and the error logs indicate - client denied by server configuration.

The vhost file in ~/stack/apache2/conf/vhosts/ is just:

<VirtualHost :80>
ServerName www.shanXXXX.com
DocumentRoot “/opt/bitnami/apache2/htdocs/test”
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.(.
)$ [NC]
RewriteRule ^(.*)$ http://%1$1 [R=permanent,L]

Any thing I can do here?
Thanks,
Shane

Hello @shane.miner,

I can see the LAMP Welcome page when accessing http://www.shaXXXX.com/. Did you manage to fix it?

Regards

Apologies, I’d removed the vhosts conf file to test other options. But I’ve put it back into the original state I described - you’ll see the error now.
Thanks,
Shane

Hi @shane.miner,

I see your DocumentRoot folder is owned by the bitnami user and group. However, apache is run by the daemon user (who is part of the daemon group as well). Can you update the permissions using the next command?

sudo chown -R bitnami:daemon /opt/bitnami/apache2/htdocs/test

Apart from that, I see you are missing some other Apache directives in your vhost file. Can you follow the steps in the next guide for adding a custom PHP application? I think this is the documentation you need to follow instead of the other one.

https://docs.bitnami.com/aws/infrastructure/lamp/administration/create-custom-application-php/

Thanks - think I go it.
Shane

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.