Skip to content

Instantly share code, notes, and snippets.

@vkbsb
Created November 29, 2022 03:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vkbsb/03f11bdc33365391d8f8e95241386c3a to your computer and use it in GitHub Desktop.
Save vkbsb/03f11bdc33365391d8f8e95241386c3a to your computer and use it in GitHub Desktop.
MultiDomain Lightsail
<VirtualHost 127.0.0.1:443 _default_:443>
ServerName prod.example.com
ServerAlias www.prod.example.com
SSLEngine on
SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
DocumentRoot /opt/bitnami/projects/sample
<Directory "/opt/bitnami/projects/sample">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:80 _default_:80>
ServerName prod.example.com
ServerAlias www.prod.example.com
DocumentRoot /opt/bitnami/projects/sample/prod
<Directory "/opt/bitnami/projects/sample/prod">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:443 _default_:443>
ServerName www.example.com
ServerAlias *
SSLEngine on
SSLCertificateFile "/opt/bitnami/apache/conf/bitnami/certs/server.crt"
SSLCertificateKeyFile "/opt/bitnami/apache/conf/bitnami/certs/server.key"
DocumentRoot /opt/bitnami/projects/sample
<Directory "/opt/bitnami/projects/sample">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.1:80 _default_:80>
ServerName www.example.com
ServerAlias *
DocumentRoot /opt/bitnami/projects/sample
<Directory "/opt/bitnami/projects/sample">
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment