Codefighter
Verified User
- Joined
- Oct 21, 2004
- Messages
- 21
I recently got SSL installed, but have a question about something that went wrong. I installed the SSL key as the user for the domain, not the admin. What I found was the default snakeoil key was still installed. Here is my research, resolution, and question:
In /etc/httpd/conf/httpd.conf:
Include /usr/local/directadmin/data/users/[username]/httpd.conf
In this file:
<VirtualHost ip:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /usr/local/directadmin/data/users/[username]/domains/[domain].cacert
I made the following changes to this file:
SSLCertificateFile /etc/httpd/conf/ssl.crt/[domain].crt
SSLCertificateKeyFile /usr/local/directadmin/data/users/[username]/domains/[domain].key
I also made the /etc/httpd/conf/ssl.crt/[domain].crt file by pasting the key I received from freessl.com into the file.
The SSL certificate began working. But, the problem I have is that I'm afraid it will break, since I'm not positive what was wrong in the first place. For example, the httpd.conf file I modified contained the following:
# Auto generated apache config file by DirectAdmin version 1.23.0
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website
The problem being that whatever DirectAdmin did, didn't seem to work. I ensured that SSL was enabled for the account, and even turned it on and off and restarted Apache a couple times, before I decided to manually edit the file. I did notice that in DirectAdmin, while in the Domain Setup option, if I changed the SSL enabled checkbox, when I did a Save the browser hung up for 5 seconds and then went to a URL of http://none. Though it saved the changes to the DirectAdmin pages (and it appears, user.conf in the appropriate domains folder) I wonder if it didn't get a chance to properly update the domain-specific httpd.conf file?
In /etc/httpd/conf/httpd.conf:
Include /usr/local/directadmin/data/users/[username]/httpd.conf
In this file:
<VirtualHost ip:443>
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /usr/local/directadmin/data/users/[username]/domains/[domain].cacert
I made the following changes to this file:
SSLCertificateFile /etc/httpd/conf/ssl.crt/[domain].crt
SSLCertificateKeyFile /usr/local/directadmin/data/users/[username]/domains/[domain].key
I also made the /etc/httpd/conf/ssl.crt/[domain].crt file by pasting the key I received from freessl.com into the file.
The SSL certificate began working. But, the problem I have is that I'm afraid it will break, since I'm not positive what was wrong in the first place. For example, the httpd.conf file I modified contained the following:
# Auto generated apache config file by DirectAdmin version 1.23.0
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to his/her website
The problem being that whatever DirectAdmin did, didn't seem to work. I ensured that SSL was enabled for the account, and even turned it on and off and restarted Apache a couple times, before I decided to manually edit the file. I did notice that in DirectAdmin, while in the Domain Setup option, if I changed the SSL enabled checkbox, when I did a Save the browser hung up for 5 seconds and then went to a URL of http://none. Though it saved the changes to the DirectAdmin pages (and it appears, user.conf in the appropriate domains folder) I wonder if it didn't get a chance to properly update the domain-specific httpd.conf file?