Howto: Virtual hosts on Bubba
Posted: 06 Nov 2007, 05:01
For each "subdomain" you should create a file in
/etc/apache2/sites-available
The file, lets call it app1, /etc/apache2/sites-available/app1. Should look something like this (Minimal example):
Where DocumentRoot points to the web root directory or web application install.
Make sure that DynDNS, or other DNS, is updated with pointers for app1.my.dyndns.com.
Enable the site on bubba
Reload configurations in apache
Now apache should show your web-app when you direct your web browser to app1.my.dyndns.com.
/etc/apache2/sites-available
The file, lets call it app1, /etc/apache2/sites-available/app1. Should look something like this (Minimal example):
Code: Select all
<VirtualHost *:80>
ServerName app1.my.dyndns.com
DocumentRoot /var/www/app1
ServerAdmin webmaster@my.dyndns.com
ErrorLog /var/log/apache2/app1_error.log
LogLevel warn
CustomLog /var/log/apache2/app1.log combined
ServerSignature On
</VirtualHost>
<VirtualHost *:443>
ServerName app1.my.dyndns.com
DocumentRoot /var/www/cool
ServerAdmin webmaster@my.dyndns.com
SSLEngine on
SSLCertificateFile /etc/apache2/my_cert.pem
SSLCertificateKeyFile /etc/apache2/my_privkey.pem
ErrorLog /var/log/apache2/app1_error.log
LogLevel warn
CustomLog /var/log/apache2/app1.log combined
ServerSignature On
</VirtualHost>
Make sure that DynDNS, or other DNS, is updated with pointers for app1.my.dyndns.com.
Enable the site on bubba
Code: Select all
a2ensite app1
Code: Select all
/etc/init.d/apache2 reload