"new" errors in virtualhost
Posted by: swehjo (---.tbcn.telia.com)
Date: December 18, 2018 05:35PM

Hi there,
Being totally novice in this are I have nevertheless been able to setup a working local WAMP environment for my Joomla development a year ago. To my knowledge I had no error messages at that time and it has been working fine and the Wamp icon always green. I did however visit my "localhost"/Wamp-server screen and saw that I now have the following messages:

Your VirtualHost
localhost:443 - Not a Listen port
mb219dev:443 - Not a Listen port
Error(s) See below
Port used for the VirtualHost is not an Apache 'Listen port' in httpd.conf
Duplicate ServerName localhost mb219dev into c:/wamp/bin/apache/apache2.4.25/conf/extra/httpd-vhosts.conf

What is wrong and how should I correct it?





==> httpd.conf
I suppose it is these lines that are wrong (even though it think it has been working before)
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 0.0.0.0:80
Listen [::0]:80





==> httpd-vhosts.conf looks like this
# Virtual Hosts
#
# 170815 none-ssl localhost
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

# 170815 SSL localhost in parallel to none-ssl localhost
<VirtualHost *:443>
ServerName localhost
ServerAlias localhost
DocumentRoot c:/wamp/www
SSLEngine on
SSLCertificateFile "c:/wamp/bin/apache/apache2.4.25/conf/key/localhost.crt"
SSLCertificateKeyFile "c:/wamp/bin/apache/apache2.4.25/conf/key/localhost.key"
<Directory "c:/wamp/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

# 170815 none-ssl mb219dev
<VirtualHost *:80>
ServerName mb219dev
DocumentRoot "c:/wamp/www/mb219dev"
<Directory "c:/wamp/www/mb219dev/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

# 170815 SSL mb219dev in parallel to none-ssl mb219dev
<VirtualHost *:443>
ServerName mb219dev
DocumentRoot "c:/wamp/www/mb219dev"
SSLEngine on
SSLCertificateFile "c:/wamp/bin/apache/apache2.4.25/conf/key/mb219dev.crt"
SSLCertificateKeyFile "c:/wamp/bin/apache/apache2.4.25/conf/key/mb219dev.key"
<Directory "c:/wamp/www/mb219dev/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>

Options: ReplyQuote
Re: "new" errors in virtualhost
Posted by: Otomatic (Moderator)
Date: December 18, 2018 07:58PM

Hi,

Applying SSL https is not done the way you did.

The SSL https port 443 part must be completely separate from the http port 80 part.

- VirtualHost for http port 80 into wamp(64)\bin\apache\apache2.4.xx\conf\extra\httpd-vhosts.conf

- Parameters for SSL and VirtualHost https SSL port 443 into wamp(64)\bin\apache\apache2.4.xx\conf\extra\httpd-ssl.conf


See the thread:

- [forum.wampserver.com]

All the information you need is in this thread.
I wouldn't repeat them.

Remember this is Apache and PHP we are configuring here and not WAMPServer, so it is all documented on the Apache and PHP sites if you get any issues or have any specific requirements.
For example : [httpd.apache.org]

------------------------------------------------------------------------------------------------------------
Wampserver 3.1.9 32 bit - Apache 2.4.39 - PHP 7.3.7/7.2.20/7.1.30/7.0.33/5.6.40 - MySQL 5.7.26 - MariaDB 10.3.16
Wampserver 3.1.9 64 bit - Apache 2.4.39 - PHP 7.3.7/7.2.20/7.1.30/7.0.33/5.6.40 - MySQL 5.7.26/8.0.16 - MariaDB 10.3.16
PhPMyadmin 4.9.0.1 - 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 »



Edited 2 time(s). Last edit at 12/19/2018 08:58AM by Otomatic.

Options: ReplyQuote
Re: "new" errors in virtualhost
Posted by: swehjo (---.tbcn.telia.com)
Date: December 19, 2018 12:34PM

Ok, I'll check this. Thanks!

Håkan

Options: ReplyQuote


Sorry, only registered users may post in this forum.