Cannot get virtual hosts to work

Keywords: LAMP/MAMP/WAMP - AWS - How to - Other
Having followed the steps on the Bitnami docs page and restarted apache I cannot get my virtual host to point to the correct directory.

Here’s the suggested code, and already I don’t really understand:



<VirtualHost _default_:80>
    ServerAlias *
    DocumentRoot /opt/bitnami/APPNAME
    <Directory "/opt/bitnami/APPNAME">
      Options -Indexes +FollowSymLinks -MultiViews
      AllowOverride All
      Require all granted

How is apache supposed to recognise vs if we’re not entering the ServerName parameter? To be fair to Bitnami, these instructions appear to relate only to subdomains, but then where are the instructions for virtual hosts for different domains? I really need to solve this, because currently, hosting these sites is costing me money I don’t have.

Hi @vurtual,

Thanks for using Bitnami. Can you try to set your domain name instead of ServerAlias * with ServerName Remember to restart Apache after that.

sudo /opt/bitnami/ restart apache

Also, 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.

No luck. I visit website a, I get the intended document, I visit website b and I get website a.

Here’s the support code:

Hi @vurtual,

Thanks for the code. According to the bnsupport bundle, I don’t see any issue with the configuration. And I was able to visit your two different domains (4go*** and vu*** However, I’m getting a forbidden error for accessing the second one, but not website 4go.... Can you check if you reproduce the same behavior in an incognito window?

If you do, can you share with us the output of running the next comand?

ls -lart /opt/bitnami

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