2

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?

3 Answers 3

1

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.

0
0

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.

0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .