If you follow the guide you posted several times, you will have several virtual hosts inside the
/opt/bitnami/apache2/conf/vhosts/ folder with the following configuration
<VirtualHost 127.0.0.1:443 _default_:443>
The ServerAlias parameter configures the domain to use to access that app, so if you use *, all domains and IPs will use that virtual host. That means that if you have many
ServerAlias *, just the first one will be use to serve the request. For example:
- If you use yourdomain.com -> it will use the first virtual host it finds. If that virtual host is for anugrah, it’ll serve the anugrah files
- if you use public_ip -> it will use the first virtual host it finds (the same one that it used before)
- if you use public_ip/app -> it will use the first virtual host it finds (the same one that it used before)
You have 2 options:
- Configure different domains for each of your apps
- or you can configure new aliases to access the apps using subdirectories (domain/app1, domain/app2, …). To do so, you will need to edit remove the new files you created under the vhosts folder and edit the default virtual host (/opt/bitnami/apache/conf/bitnami/bitnami.conf) and add the following code for each of your apps
Alias /myapp/ "/opt/bitnami/myapp"
Alias /myapp "/opt/bitnami/myapp/"
Options -Indexes +FollowSymLinks -MultiViews
Require all granted
Happy to help!
Was my answer helpful? Click on