ERROR--> Port: 443 Used for the vitual host is not an apache Listen Port
Posted by: purplestrike8689 (103.251.59.---)
Date: March 30, 2021 06:38AM

Hello all,
I installed wampserver3.2.3_x64 successfully on Windows 10 Pro. Then I also installed Win64OpenSSL_Light-1_1_1k and configure it.
At last also checked httpd -t for verification and it gave no error of syntax. I tried to open page on local machine by [localhost], it shows me default WAMP page but at bottom it gives an error stating that -- "Port: 443 Used for the vitual host is not an apache Listen Port" .

I tried to open the same page from another PC in LAN. I got the same result with same error.
Please help me to resolve this. Kindly check content of "httpd-vhost.conf" file below:

================= httpd-vhost.conf File ==================
# Virtual Hosts
<VirtualHost *:443>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
SSLEngine on
SSLCertificateFile "${SRVROOT}/conf/key/certificate.crt"
SSLCertificateKeyFile "${SRVROOT}/conf/key/private.key"

================= httpd-ssl.conf File ==================



SSLSessionCache "shmcb:${SRVROOT}/logs/ssl_scache(512000)"

<VirtualHost _default_:443>

# General setup for the virtual host
#DocumentRoot "${SRVROOT}/htdocs"
DocumentRoot "${INSTALL_DIR}/www"
ServerName localhost:443
ErrorLog "${SRVROOT}/logs/error.log"
TransferLog "${SRVROOT}/logs/access.log"

SSLEngine on
SSLCertificateFile "${SRVROOT}/conf/key/certificate.crt"
SSLCertificateKeyFile "${SRVROOT}/conf/key/private.key"
CustomLog "${SRVROOT}/logs/ssl_request.log" \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"



Options: ReplyQuote
Re: ERROR--> Port: 443 Used for the vitual host is not an apache Listen Port
Posted by: Otomatic (Moderator)
Date: March 30, 2021 10:47AM


VirtualHost port 80 in httpd-vhost.conf
VirtualHost port 443 in httpd-ssl.conf

See item 7 of Wampserver 3 - Some explanations
For example :
The Apache listening port must not only be port 443, but also port 80.
The Apache documentation on this subject specifies that you need both VirtualHost, one on port 80 and the other on port 443.
We can read in the file wamp64/bin/apache/apache2.4.46b/conf/extra/httpd-ssl.conf
# This is the Apache server configuration file providing SSL support.
# When we also provide SSL we have to listen to the
# standard HTTP port and to the HTTPS port
To avoid, as they say in my house, mixing wipes and towels, the VirtualHost port 80 are defined in the httpd-vhosts.conf file and the VirtualHost https port 443 are defined in the httpd-ssl.conf file.

Wampserver 3.2.5 32 bit - Apache 2.4.46d - PHP 8.0.3…5.6.40 - MySQL 5.7.33 - MariaDB 10.5.9
Wampserver 3.2.5 64 bit - Apache 2.4.46d - PHP 8.0.3…5.6.40 - MySQL 5.7.33/8.0.23 - MariaDB 10.5.9
PhPMyadmin 5.0.4 - MysqlDumper 1.24.5
on W10 and W7 Pro 64 bit
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons
« Ce n'est pas parce qu'ils sont nombreux à avoir tort, qu'ils ont forcément raison. Coluche »
« It's not because they are many to be wrong, they are necessarily right. Coluche »

Options: ReplyQuote

Sorry, only registered users may post in this forum.