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.

I'm using Plesk 10.4 on my server and there is a config file which is loaded:

/opt/psa/admin/conf/generated/13428096700.01562400_server.include

<IfModule mod_ssl.c>

<VirtualHost \
    IP.is.here:443 \
>
    ServerName "default-ip_is_here"
    UseCanonicalName Off
    DocumentRoot "/var/www/vhosts/default/htdocs"
    ScriptAlias /cgi-bin/ "/var/www/vhosts/default/cgi-bin"


    SSLEngine on
    SSLVerifyClient none
    SSLCertificateFile "/opt/psa/var/certificates/certHzJ8180"


</VirtualHost>

</IfModule>


<VirtualHost \
    IP.is.here:80 \
>
    # The same settings just without the SSL settings
</VirtualHost>

That looking like a general setting for SSL connections to my site.

Now I have my custom domain settings:

/var/www/vhosts/domain.com/conf/13428096700.01562400_httpd.include

<IfModule mod_ssl.c>
<VirtualHost IP.is.here:443>
    ServerName "domain.com:443"
    ServerAlias  "www.domain.com"
    ServerAdmin  "admin@domain.com"


    SSLEngine on
    SSLVerifyClient none
    SSLCertificateFile "/opt/psa/var/certificates/domain.crt"
    SSLCertificateKeyFile "/opt/psa/var/certificates/domain.key"
    SSLCertificateChainFile "/opt/psa/var/certificates/domain.ca"


    # Some more settings which has nothing to do with SSL

</VirtualHost>
</IfModule>

Somehow it takes the outdated, self-signed Plesk certificate certHzJ8180 instead of the real bought and foreign-signed certificate domain.crt. I also restarted the server, that couldn't be the reason.

Is there a way to see all loaded configuration files for Apache? Maybe there are also other loaded files which overwrites the custom domain setting again? Or what's the reason why the wrong certificate is loaded?

share|improve this question

migrated from stackoverflow.com Jul 21 '12 at 22:29

This question came from our site for professional and enthusiast programmers.

1 Answer 1

You should import your certificate via hosting panel in websites&domains tab than your certificate will be added to apache configs.

Also, do not modify auto-generated apache configs you changes will be overwritten after next configs generation. You changes can be added to special file which name exists in comments.

share|improve this answer

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.