-
Apache2 SSL
At the minute ive got a few problems with Apache2 running on Ubuntu server 7.10
First issue is that mod_alias has been uninstalled any ideas how i would re-install that.
And second ive got mod_ssl installed and it seems to be working strangely. Heres my virtualhost for the site that i want setup
Code:
<VirtualHost *>
DocumentRoot "/var/www/ssl"
ServerName ssl.dzgforum.com
<Directory "/var/www/ssl">
allow from all
Options +Indexes
</Directory>
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/apache.pem
</VirtualHost>
The server does not seem to be taking the ServerName value because if i browse to https://jacknet.co.uk the site is displayed like it should be for that virtualhost i get the documentroot of that virtualhost and everything. But if i browse to https://ssl.dzgforum.com i get nothing just the page cannot be displayed.
Any ideas?
Thanks
Jack Dunn
-
Re: Apache2 SSL
I'll try help as i use debian and theyre very similar
you have two folders in the apache2 folder
/etc/apache2/mods-available
and
/etc/apache2/mode-enabled
copy alias.load from available to enabled using drag and drop gui or the cp command.
If it displays properly on the other domain name your right its most likely the ServerName part, ive got an apache2 bible book which i would consult at this point as that seems fine to me.. except if that all wasnt being read.
for example where is said code being stored??
the bottom of apache2.conf
or ??
-
Re: Apache2 SSL
Unfortuantly I don't think you can use name based virtual hosts with SSL, take a look here for an explanation and some possible workarounds.
Iain.
-
Re: Apache2 SSL
Ive got no alias.load in my mods-enabled mind someone sending me a copy of theirs
@Iain
Thats proabably the problem thanks
-
Re: Apache2 SSL
Iain is right. You can't use name based vhosts with SSL. So your SSL vhost should be on a different port and the server name you give it is irrelevant because it'll be accessible on all domains that point to that server on port 443. Make sure that you've got 443 in your apache listen-on-ports file or whatever it's called.
Make sure that you've got the
NameVirtualHost *:443
<VirtualHost *:443>
HOST STUFF
</VirtualHost>
To get alias mod into mods-enabled directory you need to run the a2enmod command from within the mods-available folder (you'll need to use sudo) and then restart Apache.
It's been a while since i used Ubuntu Server i will admit, I'm on FreeBSD for my servers now and it's got a different method for managing modules etc. under Apache.
-
1 Attachment(s)
Re: Apache2 SSL
I know about a2enmod but that says Module not avalible the mod was acting strange a bit ago so i disabled it but now when i try to enable it it says module not avalible
Ive attached a screenshot of my VirtualHosts in webmin (purely because its easier to view). The site is still not working correctly like that, its still displaying on the site thats default jacknet.co.uk and not the site it should be ok on
-
Re: Apache2 SSL
Have you tried to apt-get the module?
-
Re: Apache2 SSL
dont know what it would be called...
-
Re: Apache2 SSL
Then search for it.
sudo apt-cache search alias
-
Re: Apache2 SSL
Tried that nothing there that i can see
-
Re: Apache2 SSL
If it's there it'll be libapache2-mod-alias or something. I dunno. Just out of interest, when you run a2enmod you're not typing the .load bit are you? You just need the bit before the extension like alias or ssl etc.
You might wanna take a look at http://ubuntuforums.org/archive/index.php/t-4466.html to check whether you've followed the right method for your SSL setup.
-
Re: Apache2 SSL
also if the mod is installed then you have to enable it by putting it in the handy "mods-enabled" folder
-
Re: Apache2 SSL
no, use a2enmod to enable it.