Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

So originally my host (mediatemple dv) has two default directories for the roots:

1)httpdocs/ 2)httpsdocs/

In the conf directory I changed the vhosts.conf and httpd.include and others to change from httpdocs to custom folders.

Now I installed a new ssl certificate and https://example.com goes to the default page located at httpsdocs.

I'm just wondering where configurations for apache are stored for ssl.

Ideas?

share|improve this question
add comment

3 Answers

up vote 1 down vote accepted

In a "normal" install, there's typically /etc/httpd/ that contains configuration. Specifically, there's /etc/httpd/conf/httpd.conf which is the "main" configuration file, and it specifies that all .conf files in /etc/httpd/conf.d/ are then included.

In my configs, I have /etc/httpd/conf.d/ssl.conf which does all of the https-specific configuration, but there's a wide degree of flexibility for the administrator to decide on.

share|improve this answer
add comment

Generally, you'll configure the SSL settings that are not necessarily specific to a given host (e.g. SSLCipherSuites) in /etc/httpd/conf.d/ssl.conf (or similar in other distributions), but configure what's specific to a given host in its own VirtualHost (with the appropriate port), more or less like this:

<IfModule mod_ssl.c>
<VirtualHost *:443>
        # ...

        SSLEngine       on
        SSLCertificateFile      /etc/ssl/certs/host.pem
        SSLCertificateKeyFile   /etc/ssl/private/host.key

        DocumentRoot /path/to/https/root
</VirtualHost>
</IfModule>

<VirtualHost *:80>
        # ...

        DocumentRoot /path/to/plain-http/root
</VirtualHost>

You could put the part with into its own file in /etc/httpd/conf.d/ or within ssl.conf.

It depends on the distribution. On Debian/Ubuntu, you'll probably have the general SSL configuration in /etc/apache2/mods-available/ssl.conf and the site/virtualhost specific configuration in /etc/apache2/sites-available/some-name.conf.

share|improve this answer
add comment

The solution for me was to create a vhost_ssl.conf file pointing to the new Document Root in /var/www/vhosts/example.com/conf/ and then run /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=example.com for Plesk.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.