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
[FAILED]

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

LoadModule ssl_module modules/mod_ssl.so
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…

https://deepmatrix.net is loading its correct homepage.

BUT https://pixpile.com is also loading the deepmatrix.net homepage

So are the other 2 domains.

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

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

1 Like

grep -ri pixpile.com /etc/zpanel/configs
/etc/zpanel/configs/apache/httpd-vhosts.conf:# DOMAIN: pixpile.com
/etc/zpanel/configs/apache/httpd-vhosts.conf:ServerName pixpile.com
/etc/zpanel/configs/apache/httpd-vhosts.conf:ServerAlias pixpile.com www.pixpile.com
/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/pixpile.com-error.log”
/etc/zpanel/configs/apache/httpd-vhosts.conf:CustomLog “/var/zpanel/logs/domains/zadmin/pixpile.com-access.log” combined
/etc/zpanel/configs/apache/httpd-vhosts.conf:CustomLog “/var/zpanel/logs/domains/zadmin/pixpile.com-bandwidth.log” common
/etc/zpanel/configs/apache/httpd-vhosts.conf:# END DOMAIN: pixpile.com
/etc/zpanel/configs/bind/etc/named.conf:zone “pixpile.com” IN {
/etc/zpanel/configs/bind/etc/named.conf: file “/etc/zpanel/configs/bind/zones/pixpile.com.txt”;
/etc/zpanel/configs/bind/zones/pixpile.com.txt:@ IN SOA ns1.pixpile.com. postmaster.pixpile.com. (
/etc/zpanel/configs/bind/zones/pixpile.com.txt:@ 86400 IN MX 10 mail.pixpile.com.
/etc/zpanel/configs/bind/zones/pixpile.com.txt:@ 172800 IN NS ns1.pixpile.com.
/etc/zpanel/configs/bind/zones/pixpile.com.txt:@ 172800 IN NS ns2.pixpile.com.
/etc/zpanel/configs/bind/zones/foxtion.com.txt:@ 172800 IN NS ns1.pixpile.com.
/etc/zpanel/configs/bind/zones/foxtion.com.txt:@ 172800 IN NS ns2.pixpile.com.

It already exists here:
/etc/zpanel/configs/apache/httpd-vhosts.conf

I think the zpanel-ssl-vhost.conf may just be for the zpanel itself.
Or
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/main.inc.php:// set the port for the ssl connection as value of this option if it differs from the default 443

perfect, then just modify
/etc/zpanel/configs/apache/zpanel-ssl-vhost.conf
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 pixpile.com 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
[FAILED]

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
        </IfModule>

</Directory>

# 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
</Directory>

# 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

#CUSTOM SSL LetsEncrypt CONFIGURATION
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…

2 Likes

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

2 Likes

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