Page 1 of 1

ssl

PostPosted: 10. December 2003 14:03
by sitespider
Hi,

I am trying to configure ssl on my server and i have a couple of questions:
1) how do i edit the ssl certificate
2) is it possible to make one of the folders in my site only accessable through ssl

thanks

Phil

PostPosted: 10. December 2003 17:58
by Oswald
Hi Phil!

To create a self-signe certificate simple do the following three steps:

Step 1

Create a new private key for your server and call
/opt/lampp/bin/openssl genrsa 1024 > /opt/lampp/etc/ssl.key/server.key


Step 2

Sign your key by calling

/opt/lampp/bin/openssl req -new -x509 -key /opt/lampp/etc/ssl.key/server.key -out /opt/lampp/etc/ssl.crt/server.crt

Now you have to answer some questions about you and your organisation. The question about "Common Name (eg, YOUR name)" you've to answer with the Internet address of you webserver. For example "www.apachefriends.org". Without http://.

Step 3

Make the Apache know the new certificate:

/opt/lampp/lampp reloadapache

And you access your web sever via https. You should now get your new certifcate.

To your second question: Use for you SSL virtual host a different document root and simply put the files you only want to get by SSL on into this directory.

Good luck and greetings
Oswald

PostPosted: 10. December 2003 23:15
by sitespider
thanks that works great

Once tried to install ssl everthing went crazy!

PostPosted: 02. September 2004 01:03
by kevinm2
Everything was running fine, till I tried to have gerenate a ssl connection.

now, in the error_log I am getting "[notice] caught SIGTERM, shutting down".

when I type in "http://www.domain.com" everthing is fine. But with "https://www.domain.com" it hangs.

In the httpd.conf, all I have added is the follwoing:
### Section 1
Listen 80
Listen 443

### Section 2
ServerAdmin info@domain.com
ServerName www.domain.com:80

DocumentRoot "/opt/lampp/htdocs/domain"

<Directory "/opt/lampp/htdocs/domain">
.
.
</Directory>

DirectoryIndex index.html index.htm index.php

In the ssl.conf, all I have added is the follwoing:

## SSL Virtual Host Content

<VirtualHost _Default_:443>
DocumentRoot "/opt/lampp/htdocs/domain"
ServerName www.domain.com:443

and the route to the ssl.key and ssl.crt that I generated myself.

Furthermore, when I go to the server via a URL "http://www.domain.com/index.php" I get the actual php code and not the htm format.

What am I doing wrong :?: