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

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

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:

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>
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?

Hello @shane.miner,

I can see the LAMP Welcome page when accessing Did you manage to fix it?


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.

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.

Thanks - think I go it.

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