Issue with vhosts not working correctly in latest LAMP build

Keywords: LAMP/MAMP/WAMP - AWS - Technical issue - Other
Description:
When configuring vhost records in the system packages approach, subsequent websites are not resolving to their correct directory.

In example, my configuration is as follows:

default bitnami.conf has not been modified
a wordpress-vhost.conf file has been created inside the bitnami/vhosts folder

<VirtualHost *:80>
ServerName website1.com
DocumentRoot "/opt/bitnami/apache2/htdocs/website1"
</VirtualHost>

<Directory /opt/bitnami/apache2/htdocs/website1>
    Options -Indexes +FollowSymLinks -MultiViews
    AllowOverride All
    Require all granted
</Directory>

<VirtualHost *:80>
ServerName website2.com
DocumentRoot "/opt/bitnami/apache2/htdocs/website2"
</VirtualHost>

<Directory /opt/bitnami/apache2/htdocs/website2>
    Options -Indexes +FollowSymLinks -MultiViews
    AllowOverride All
    Require all granted
</Directory>

In the above example, website 2 displays correctly on it’s url website1.com

website2.com resolves to the parent directory:

Index of /
website1
website 2

This wasn’t happening within the previous apache config setup. htdocs supported multiple websites without the need for separate folders.

Any help appreciated. Thank you!

Hi @systemajik,

If you are deploying PHP applications on top of a LAMP solution, I suggest you take a look at these guides in our documentation

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

If you still have doubts, we have a Support Tool that will gather relevant information for us to analyze your configuration and logs. Could you please execute it on the machine where the stack is running by following the steps described in the guide below?

Please note that you need to paste the code ID that is shown at the end.

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