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?

Matthew
  • 1,769
  • 4
  • 21
  • 32

3 Answers3

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.

Matt Simmons
  • 20,218
  • 10
  • 67
  • 114
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.

Bruno
  • 4,069
  • 1
  • 20
  • 37
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.

Marko
  • 227
  • 4
  • 7
  • 15
Jish
  • 1