VirtualHost overlap on port 443 localhost.localdomain

restart failed:

service httpd restart
Stopping httpd: [ OK ]
Starting httpd: Syntax error on line 11 of /etc/zpanel/configs/apache/zpanel-ssl-vhost.conf:
Invalid command ‘SSLEngine’, perhaps misspelled or defined by a module not included in the server configuration

@QuantumFlux OK, try to put these lines into /etc/httpd/conf.d/ssl.conf:

LoadModule ssl_module modules/
Listen 443
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin

This will basically setup mod_ssl without the default virtual host.
Then restart apache.

Those lines are already in the ssl.conf

I thought you renamed the file?
You may also edit ssl.conf and delete everything including and below the first <VirtualHost> , that would be the same result.

Please note: the filename has to be ssl.conf, not ssl.conf.anything because this won’t be included from the main Apache configuration file.

Ok misunderstanding. I renamed the file back.
I shall rinse and repeat…try again

Wow Ok… That worked this is what I get now. its Getting closer.
Thanks for your help btw. its awesome… is loading its correct homepage.

BUT is also loading the homepage

So are the other 2 domains.

I’m thinking I need to add the to the custom /etc/zpanel/configs/apache/zpanel-ssl-vhost.conf

See what you got first:
grep -ri /etc/zpanel/configs

1 Like

grep -ri /etc/zpanel/configs
/etc/zpanel/configs/apache/httpd-vhosts.conf:# DOMAIN:
/etc/zpanel/configs/apache/httpd-vhosts.conf:DocumentRoot “/var/zpanel/hostdata/zadmin/public_html/pixpile_com”
/etc/zpanel/configs/apache/httpd-vhosts.conf:php_admin_value open_basedir “/var/zpanel/hostdata/zadmin/public_html/pixpile_com:/var/zpanel/temp/”
/etc/zpanel/configs/apache/httpd-vhosts.conf:ErrorLog “/var/zpanel/logs/domains/zadmin/”
/etc/zpanel/configs/apache/httpd-vhosts.conf:CustomLog “/var/zpanel/logs/domains/zadmin/” combined
/etc/zpanel/configs/apache/httpd-vhosts.conf:CustomLog “/var/zpanel/logs/domains/zadmin/” common
/etc/zpanel/configs/apache/httpd-vhosts.conf:# END DOMAIN:
/etc/zpanel/configs/bind/etc/named.conf:zone “” IN {
/etc/zpanel/configs/bind/etc/named.conf: file “/etc/zpanel/configs/bind/zones/”;
/etc/zpanel/configs/bind/zones/ IN SOA (
/etc/zpanel/configs/bind/zones/ 86400 IN MX 10
/etc/zpanel/configs/bind/zones/ 172800 IN NS
/etc/zpanel/configs/bind/zones/ 172800 IN NS
/etc/zpanel/configs/bind/zones/ 172800 IN NS
/etc/zpanel/configs/bind/zones/ 172800 IN NS

It already exists here:

I think the zpanel-ssl-vhost.conf may just be for the zpanel itself.
It is for all the ssl sites - can't tell from where I'm sitting...

This file is auto generated by zpanel and is rewritten when you make changes in the panel . there is only 80 not 443 for pixpile or the other domains
Ive read every where don’t touch that file.
That’s why i created /etc/zpanel/configs/apache/zpanel-ssl-vhost.conf and used it as an Include
in /etc/zpanel/configs/apache/httpd.conf

OK, show:
grep -r 443 /etc/zpanel/configs

1 Like

grep -r 443 /etc/zpanel/configs
/etc/zpanel/configs/apache/zpanel-ssl-vhost.conf:<virtualhost *:443>
/etc/zpanel/configs/roundcube/ set the port for the ssl connection as value of this option if it differs from the default 443

perfect, then just modify
to include additional vhost configs (to cover all the other different sites)

1 Like

Ok. I will do that and then update the post with the results.

Added to /etc/zpanel/configs/apache/zpanel-ssl-vhost.conf

restarted apache and it failed.
service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Fri Nov 10 14:30:40 2017] [warn] default VirtualHost overlap on port 443, the first has precedence

Ive read in the forums here to be each domain in a separate file.
Not sure why that would be required.

You are mixing control panel configuration files with user-defined configuration files. This is always a mess and the reason you are shooting yourself into the foot.

lol. bang bang...
Anyone who uses letsEncrypt and Zpanel now called Sentora will have the same problem.

the /etc/zpanel/configs/apache/httpd.conf
has an include for the zpanel generated

nano /etc/zpanel/configs/apache/httpd.conf

# ZPanel Apache Include file for CentOS Linux
# Written by Bobby Allen, 15/05/2011

# Set the Zpanel Alias (used for development, sable will eventually use a VHOST)
Alias /zpanel /etc/zpanel/panel

# Setup the directory settings and PHP security flags for the Zpanel application directory.
<Directory /etc/zpanel/panel>
        Options FollowSymLinks
        AllowOverride All
        DirectoryIndex index.php
        <IfModule mod_php5.c>
                AddType application/x-httpd-php .php
                php_flag magic_quotes_gpc Off
                php_flag track_vars On
                php_flag register_globals Off
                php_admin_value upload_tmp_dir /etc/zpanel/temp


# Disallow web access to directories that don't need it/that we don't want people looking in!
<Directory /etc/zpanel/panel/cnf>
    Order Deny,Allow
    Deny from All

# Set server tokens (security??)
ServerTokens Maj

# Now we include the generic VHOST configuration file that holds all the ZPanel user hosted vhost data
Include /etc/zpanel/configs/apache/httpd-vhosts.conf

Include /etc/zpanel/configs/apache/zpanel-ssl-vhost.conf

I have the solution for Zpanel /Sentora.
It took more than a week. help from here.

Installing letsEncrypt to work with Zpanel was ridiculously simple.
It will work with one certificate with child domains and/or
Separate domain certificates.

It may be a simple solution for other situations as well.

I will write a quick instructional guide in a new post.
Add the link here…


Ive written a step by step and posted here on the Forum.
Thanks all for your help.


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.