Archive

Posts Tagged ‘443’

Wildcard SSL multiple sites under same IP

February 23rd, 2009 Arthur Gressick No comments

Ok so this was a bit tricky but I knew it would work and this is not for everyone out there. Remember this is a subdomain and I got a wildcart SSL from GoDaddy (look up my instructions for installing a GoDaddy certificate.

I am using Ubuntu 8.10 server for this and not many changes from the standard install. I want to support multiple sites through 443 on the same IP.

Go to /etc/apache2/ports.conf  Here is what I have, your might be a bit different

# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default
 
NameVirtualHost *:80
Listen 80
 
<IfModule mod_ssl.c>
    # SSL name based virtual hosts are not yet supported, therefore no
    # NameVirtualHost statement here
    NameVirtualHost *:443
    Listen 443
</IfModule>

Then setup the virtual host files just like normal. Here is the open close headers for this

<VirtualHost *:443>
    ....
</VirtualHost>

Apache SSL redirect

February 12th, 2009 Arthur Gressick No comments

So I have this secure shopping cart RoR project. I want people to simply navigate to the web address but when they get there I want them to automatically be moved over the the SSL version. I was looking for a simply solution one that I could very easily implement without changing much of the code of the site. Here is how I did it.

In Apache Virtual Host file on the *:80 config I have this set.

<VirtualHost *:80>
     ServerName subdomain.domain.com
     Redirect / https://subdomain.domain.com/
     ServerAlias subdomain.domain.com
</VirtualHost>

This will direct any of the information coming in on the port 80 over to the 443/https portion of the website. Make sure you have the HTTP portion configured properly.