Installing two SSL Certificates on one server

Using one SSL certificate on the server is pretty easy, but what when we want to use SVN with apache and run the site which requires a payment system? Check if you do not have a second IP address before renting next server. Fortunately – Fasthosts give it for all servers.

Configuration happened to not be very complicated.

Requirements:

* server with two IP addresses
* apache(2) with working SSL on one server

Configuring the second IP address on Gentoo

If one has two Ethernet cards there is just a need to use them, The „not so standard“ part is when there is only one Ethernet card and more IP addresses pointing to it.

In gento one has to edit the /etc/conf.d/net file and add alias to the existing ethX, in my case – eth0.

config_eth0=(
        "xxx.xxx.xxx.89 netmask 255.255.252.0 brd xxx.xxx.yyy.255"
        "xxx.xxx.xxx.88 netmask 255.255.252.0 brd xxx.xxx.yyy.255"
        )

Restart the network services

/etc/init.d/net.eth0 restart

Then ifconfig should show both IP addresses the aliased one as eth0:1

eth0      Link encap:Ethernet  HWaddr 00:30:05:zz:zz:zz
          inet addr:xxx.xxx.xxx.89  Bcast:xxx.xxx.yyy.255  Mask:255.255.252.0
[...]
eth0:1    Link encap:Ethernet  HWaddr 00:30:05:zz:zz:zz
          inet addr:xxx.xxx.xxx.88  Bcast:xxx.xxx.yyy.255  Mask:255.255.252.0

Create/buy Certificate

Taken from gentoo-wiki

cd /etc/apache2/ssl/
openssl genrsa -out server.key 1024
openssl rsa -in server.key -out server.pem
openssl req -new -key server.pem -out server.csr
chmod 600 server.*

Fill all needed information (do remember that the common name (CN) is the exact name of your website).

Use the server.csr to buy certificate or sign it on your own:

openssl x509 -req -days 365 -in server.csr -signkey server.pem -out server.crt

Configure Apache

Apache2 version before 2.2

vi /etc/apache2/modules.d/41_mod_ssl.default-vhost.conf

Apache2 version 2.2

vi /etc/apache2/vhosts.d/00_default_ssl_vhost.conf

Change _default_ in <VirtualHost _default_:443> to <VirtualHost xxx.xxx.xxx.88:443>

Copy whole Virtual Host section and change the IP of the second section VirtualHost definition.

Remember to change the SSLCertificateFile and SSLCertificate­KeyFile values in the second VirtualHost section to point to the right certificate files

Restart apache and voila!

/etc/init.d/apache2 restart

Trackback URL for this post:

http://piotr.zalewa.info/trackback/40

Comments

moncler coat (not verified) 1970, January 1 - 00:00

I really have learned a lot from you.Thanks for sharing. So many people have come to your blog.

Metatrader Programming (not verified) 1970, January 1 - 00:00

gento one has to edit the /etc/conf.d/net file and add alias to the existing ethX, in my case.

break up quotes (not verified) 1970, January 1 - 00:00

I rancor straightlaced enjoyed trait your wet posts.I am impressed.I was toil for determinative weakening on this somatesthesia. Salutary act Add for recounting !!! brother quotes

Dr Manuel Harrer (not verified) 1970, January 1 - 00:00

Is that a good idea?

Alcachofa (not verified) 1970, January 1 - 00:00

Awesome site you have here but I was curious if you knew of any message boards that cover the same topics discussed in this article? I'd really love to be a part of online community where I can get opinions from other knowledgeable people that share the same interest. If you have any suggestions, please let me know. Thanks a lot!

hard anodized cookware sets (not verified) 1970, January 1 - 00:00

maybe becoming a member will take me to get the information quickly.hard anodized cookware sets

stainless steel cookware set (not verified) 1970, January 1 - 00:00

gento one has to edit the /etc/conf.d/net file and add alias to the existing ethX, in my case.

Dipi (not verified) 1970, January 1 - 00:00

I still can't get it to work. I guess I ned to hire an IT guy.

north face online (not verified) 1970, January 1 - 00:00

north face online ,the north face online ,northface online ,online north face

Ralph Lauren Rugbys (not verified) 1970, January 1 - 00:00

Ralph Lauren sale online with the cheapest price and free shipping offers a variety of options that complement the iconic Polo Ralph Lauren lifestyle no matter they are worn for a office workday, a beach weekend or a country side excruise outside. Welcome to have a look at our Ralph Lauren polo shirts store and place orders to us anytime at your convenience. http://www.po­loralphlauren-sale.com

Dried Fruits and Nuts (not verified) 1970, January 1 - 00:00

Good feedback to you – nice site.

Seo Company (not verified) 1970, January 1 - 00:00

Fortunately – Fasthosts give it for all servers.

Cheap Nike free run (not verified) 1970, January 1 - 00:00
procurement solutions (not verified) 1970, January 1 - 00:00

nice explanation i learnt more thanks

sharepoint room reservation

LEED Consultants (not verified) 1970, January 1 - 00:00

I am still just confused with the script program that I need to make.

bag factory (not verified) 1970, January 1 - 00:00

s a payment system? Check if you do not have a second IP address before renting

server rack (not verified) 1970, January 1 - 00:00

I most certainly will definitely keep coming back to get knowledgeable.

electronic cigarette review (not verified) 1970, January 1 - 00:00

In my opinion you provide really important things about it!electronic cigarette review

server cabinet (not verified) 1970, January 1 - 00:00

I love your work, and look forward to new posts in my ipad.

rowing machine (not verified) 1970, January 1 - 00:00

The inter-connection between thousands of gamers around the world and play at the same time is what they are addicted for.

digital multitrack recorder (not verified) 1970, January 1 - 00:00

time is what they are addicted for. The inter-connection between thousands of gamers around the world and play at the same

pacquiao vs marquez (not verified) 1970, January 1 - 00:00

This is rather informative post and we're able to know about comedians. It definitely is perfect place for us to get pleasure from and get rid of tensions.

college term paper (not verified) 1970, January 1 - 00:00

In my opinion you provide really important things about it!

Dieta Catalin Crisan (not verified) 1970, January 1 - 00:00

I don't know how to install one of this but two. Anyway, i will give it a try!

watch free movies online (not verified) 1970, January 1 - 00:00

Video online game has been such promising industry for the last couple of years. The inter-connection between thousands of gamers around the world and play at the same time is what they are addicted for.

Online flash games (not verified) 1970, January 1 - 00:00

Classical problems are all there time to time and there is something we can also do in the future too. There are so many things in this world which are interesting.

Biletul zilei fotbal (not verified) 1970, January 1 - 00:00

Is just i need. I was pretty nervous before i read your post. Thank you!

Chris Harris (not verified) 1970, January 1 - 00:00

Hey there, thank you for the tips, will be a pleasure to be back, keep updating on the latest here.. Risk Management Consultants

payday loans (not verified) 1970, January 1 - 00:00

But thanks – it's getting late and this has helped me prepare for sleep. payday loans | payday loans no credit check

custom essay (not verified) 1970, January 1 - 00:00

This stuff is pretty useful for my work, thank you!

gerry1975 (not verified) 1970, January 1 - 00:00

I have a question though for our iphone 4 sliding keyboard case site, is it also applicable to apply this on Linux based platforms?

Baltimore internet marketing (not verified) 1970, January 1 - 00:00

After going through the bleak years. The years are filled with training. Finally, today is my first day, officially became a programmer. I am very proud of this.

clothing factory (not verified) 1970, January 1 - 00:00

Is it true that it's impossible to have multiple ssl certs for a single IP?

Cord Blood Banking Cost (not verified) 1970, January 1 - 00:00

Let alone to think about this. I am still just confused with the script program that I need to make.

how to lose weight in a week (not verified) 1970, January 1 - 00:00

Be sure to consider the learning needs of your audience and why you write your articles. Whenever possible, go with questions that are relatively new. Speaking of problems over and over again will not help you get your items noticed by the online marketing is the process of submitting articles to article directories users.Article for website owners to use content from their sites free. In return, you can add a resource or bio box "at the end of your article that you can use to get traffic to your site.

sleeping remedies (not verified) 1970, January 1 - 00:00

Awesome site you have here but I was curious if you knew of any message boards that cover the same topics discussed in this article? I'd really love to be a part of online community where I can get opinions from other knowledgeable people that share the same interest. If you have any suggestions, please let me know. Thanks a lot!

régime rapide (not verified) 1970, January 1 - 00:00

I would like to say rather thank you for this wonderful informations. now i recognize about it. Thank you !

latex mattress (not verified) 1970, January 1 - 00:00

I'm on it too. And just get it in a few day, maybe becoming a member will take me to get the information quickly.

Shared Files (not verified) 1970, January 1 - 00:00

Is it true that it's impossible to have multiple ssl certs for a single IP?

hermes bag (not verified) 1970, January 1 - 00:00

GLT10a09river14 There are a lot of sports on the market today and buyers need to make sure that the one that they buy has the all the basic features.

Anonymous (not verified) 1970, January 1 - 00:00

vgf

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.