Apache with SSL
Stifan Kristi
sugizo at japan.com
Wed Jan 13 21:46:53 UTC 2010
Damien Hull wrote:
> I'm trying to configure Apache2 with SSL. I did a lot of searching on the net and found instructions that don't work. Here's what I have...
>
> 1. Ubuntu 8.04 server
> 2. Apache2 LAMP configuration
> 3. SSL Cert from GoDaddy - mydomain.crt & gd_bundle.crt
> 4. mod_ssl is loaded
>
> How do I configure Apache so SSL works for part of my domain?
> 1. Main site doesn't need ssl
> 2. shop.mydomain.com needs ssl
> 3. Using virtual hosts
>
> It would be nice if I could see someone's working Apache config.
>
>
>
*Update and Install Packages *
sudo apt-get update
sudo apt-get install apache2 ssl-cert
*Create a Certificate SSL for Apache *
sudo mkdir /etc/apache2/ssl
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf
/etc/apache2/ssl/apache.pem
Host name: ubuntu.linux.vmw
*Enable Apache 2 Module*
sudo a2enmod ssl
sudo a2enmod rewrite
sudo a2enmod suexec
*Create and Edit Virtual Host for SSL Website Configuration *
cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ssl
sudo vim /etc/apache2/sites-available/ssl
NameVirtualHost *:443
<virtualhost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/apache.pem
ServerSignature On
ServerAdmin sugizo at japan.com
*Enable SSL Virtual Host *
sudo a2ensite ssl
*Backup and Edit Apache Configuration *
cp /etc/apache2/apache2.conf /bkup/apache2.conf.ori
sudo vim /etc/apache2/apache2.conf
ServerAdmin sugizo at japan.com
ServerName debian.linux.vmw
*Restart Apache Service *
sudo /etc/init.d/apache2 restart
*Test Apache *
Open Your Browser Type : http://debian
or
http://192.168.44.9
*Test Secure Apache*
Open Your Browser Type : https://debian
or
https://192.168.44.9
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100114/23f4f338/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sugizo.vcf
Type: text/x-vcard
Size: 204 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100114/23f4f338/attachment.vcf>
More information about the ubuntu-users
mailing list