Hi msx,
Regarding the subdomains,
In this case you should use virtual hosts in apache.
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):
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>
Where DocumentRoot points to the web root directory or web application install.
Make sure that DynDNS 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.
Regarding SSL certificates.
These are indeed the same on all Bubbas, since as you correctly guess have an filesystem image for installation.
If you want to change them. Pointed out above with SSLCertificateFile and SSLCertificateKeyFile in the config above. You can do as follow.
Code: Select all
openssl req -new -x509 -nodes -out my_cert.pem -keyout my_privkey.pem
And answer the questions Fx
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:
SE
State or Province Name (full name) [Some-State]:
My State
Locality Name (eg, city) []:
.
Organization Name (eg, company) [Internet Widgits Pty Ltd]:
My Company
Organizational Unit Name (eg, section) []:
Web
Common Name (eg, YOUR name) []:
app1.my.dyndns.com
Email Address []:
info@app1.my.dyndns.com
This will generate the two files:
my_cert.pem - the certificate
my_privkey.pem - the private key used
The path to these files should match in above config.
An important note here. You can only have one certificate usable at a given time (Per IP number and port at least). So this must be the same as used in the main config,
/etc/apache2/sites-available/bubba, if not bubbas original certificate will be used.
I hope this give some hints on how to do this.
/Tor