help correctly declaring a specific port for a virtual host, please.
Posted by: Tigercat (185.222.27.---)
Date: July 18, 2022 08:41PM

I have:
Windows 10
Wampserver 3.2.3
Php 7.4.26
Apache 2.4.46
mysql 5.7.31
Wampserver icon is green
No maria

"All VC++ packages needed to Wampserver are installed correctly."

I'm afraid I'm back again.
This time, I have tried to add a new Virtual Host.
I right-clicked on the green icon, selected Tools, then Add a Virtual Host.
In the box, I entered 8086 and clicked Enter. The command prompt window opened and closed several times.
I restarted/reopened the Localhost page and ran Add a Virtual Host from that page. The ports available are still only 8084 and 8085.
I have not found appropriate help at the Wampserver forum. Would you please advise how I correctly declare a specific port for a virtual host?

With my thanks in advance
TC

Options: ReplyQuote
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Otomatic (Moderator)
Date: July 18, 2022 09:52PM

Hi,

- 1 - Upgrade to Wampserver 3.2.9

- 2 - Install addon Apache 2.4.54

- 3 - Launch Wampserver

- 4 - Right-Click -> Restart from zero

- 5 - Switch to Apache 2.4.54
Left-Click -> Apache -> Version -> 2.4.54
Copy your httpd-vhosts.conf from 2.4.46 to 2.4.54 and listen ports when you are asked to.

Right-Click -> Tools -> Add a listen port to Apache

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.10 32 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.2.10 64 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - 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
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Tigercat (217.146.29.---)
Date: July 19, 2022 08:31PM

Hello
A long post, I'm afraid. My comments bookended by ###.

- 1 - Upgrade to Wampserver 3.2.9
###Done###
- 2 - Install addon Apache 2.4.54
###Done###
- 3 - Launch Wampserver
###icon is only turning orange, with
Warning Apache error
There is a syntax error in Apache conf files.
AH00526: Syntax error on line 76 of C:/wamp64/bin/apache/apache2.4.46/conf/httpd.conf:
Cannot define multiple Listeners on the same IP:port ###

- 4 - Right-Click -> Restart from zero
###icon green, then orange
Warning Apache error
There is a syntax error in Apache conf files.
AH00526: Syntax error on line 76 of C:/wamp64/bin/apache/apache2.4.46/conf/httpd.conf:
Cannot define multiple Listeners on the same IP:port ###

###continued anyway.###
- 5 - Switch to Apache 2.4.54
Left-Click -> Apache -> Version -> 2.4.54

###This throws up a box with###
SWITCH APACHE VERSIONS - FROM CURRENT APACHE 2.4.46 TO APACHE 2.4.54
There are differences between Apache 2.4.54 and Apache 2.4.46
--------------------------------------------------------------------------------------
*** -> httpd-vhosts.conf Key 'V' for YES - Requested update NO
2.4.54 2.4.46
Number of lines 12 43
--------------------------------------------------------------------------------------
*** -> Default Port used by Apache Key 'P' for YES - Requested update NO
2.4.54 2.4.46
Port 80 8083
If the only difference between the httpd-vhosts.conf files
is the port number 80 versus 8083
the default Apache listening port will be automatically updated
by this Apache version change procedure.
--------------------------------------------------------------------------------------
*** -> Listen Ports Key 'L' for YES - Requested update NO
2.4.54 : 80
LISTEN PORT TO ADD : 8083 - 8084 - 8085 - 8083
LISTEN PORT TO DELETE : 80
2.4.46 : 8083 - 8084 - 8085 - 8083
--------------------------------------------------------------------------------------
Do you want to copy or update configured files
FROM Apache 2.4.46 -> to Apache 2.4.54

For ALL updates press 'A' key then Enter key
For RESET choice press 'R' key then Enter key
To CANCEL updates, press only Enter key
When your CHOICE is READY press 'G' key then Enter key
To choose one or more updates, press the associated key then Enter key:

###Clicked to copy the box (fazed by all this verbage, I'm afraid) and box gone, and icon goes green. Apache version now 2.4.54! ###

Copy your httpd-vhosts.conf from 2.4.46 to 2.4.54 and listen ports when you are asked to.

###Ah, listen ports are in httpd.conf.###
###Restarted Wampserver again, and the icon is orange with no error message.
Exited Wampserver completely, then restarted, icon green, then orange.###

Warning

Unable to find the Apache variables.
There may be a syntax error in Apache conf files.
To be checked by the tool integrated in Wampserver:
Right-click -> Tools -> Check httpd.conf syntax.

###httpd.conf Line 76 is Listen 0.0.0.0:${MYPORT8083}

Please would you advise? Thanks.###

Options: ReplyQuote
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Otomatic (Moderator)
Date: July 19, 2022 09:35PM

Hi,

What are ALL lines in httpd.conf beginning with Listent ?

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.10 32 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.2.10 64 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - 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
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Tigercat (217.146.29.---)
Date: July 20, 2022 12:10AM

Hello

73 #Listen 12.34.56.78:80
74 Listen 0.0.0.0:8083
75 Listen [::0]:8083
76 Listen 0.0.0.0:${MYPORT8083}
77 Listen [::0]:${MYPORT8083}
78 Listen 0.0.0.0:${MYPORT8084}
79 Listen [::0]:${MYPORT8084}
80 Listen 0.0.0.0:${MYPORT8085}
81 Listen [::0]:${MYPORT8085}

Thanks for your attention and help.

Options: ReplyQuote
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Otomatic (Moderator)
Date: July 20, 2022 09:14AM

Hi,

Replace:
74 Listen 0.0.0.0:8083
75 Listen [::0]:8083
by
74 Listen 0.0.0.0:80
75 Listen [::0]:80
then restart Wampserver

And, to avoid mistakes later, could you put the three lines here from wampmanager.conf file
[apacheoptions]
apacheUseOtherPort = xxx
apachePortUsed = xxx

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.10 32 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.2.10 64 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - 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
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Tigercat (217.146.29.---)
Date: July 21, 2022 02:37PM

Hello

Oh, what a silly and simple mistake.
Mea culpa.
And yes, everything is working and healthy.
Thank you ^_^

Regarding putting those lines into wampmanager.conf, there is already
[apacheoptions]
apacheUseOtherPort = "on"
apachePortUsed = "8083"
apacheCompareVersion= "off"
apacheRestoreFiles= "off"
apacheGracefulRestart= "on"
apachePhpCurlDll= "off"

Do I replace lines
apacheUseOtherPort = "on"
apachePortUsed = "8083"
or do I put
apacheUseOtherPort = xxx
apachePortUsed = xxx
say, before what is already there?

Hope you're not too hot, and thank you for your help.

Options: ReplyQuote
Re: help correctly declaring a specific port for a virtual host, please.
Posted by: Otomatic (Moderator)
Date: July 21, 2022 02:57PM

Hi,

I am very doubtful and surprised that you have this configuration:
[apacheoptions]
apacheUseOtherPort = "on"
apachePortUsed = "8083"
This is an option used when Apache can't use port 80 at all and this is not the case because with the last modification you just made to replace the Listen ...:8083 by Listen ....:80 Wampserver works perfectly.
I can only advise you to put back the original configuration:
[apacheoptions]
apacheUseOtherPort = "off"
apachePortUsed = "80"
To do Wampserver stopped.

------------------------------------------------------------------------------------------------------------
Wampserver 3.2.10 32 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39 - MariaDB 10.5.13/10.6.5
Wampserver 3.2.10 64 bit - Apache 2.4.54 - PHP 8.2.0…5.6.40 - MySQL 5.7.39/8.0.30 - MariaDB 10.5.17/10.9.2
PhPMyadmin 5.2.0 - 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.