Running 2 xampp servers of different version?

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Running 2 xampp servers of different version?

Postby merklijm » 02. January 2023 14:43

Hello,
Is it possible to run 2 xampp servers for the same domain on a single public IP in order to have:
- 1 xampp on one machine for a subdomain in HTTPS
- and the 2nd xampp on another machine for another subdomain in HTTP?
Thx
merklijm
 
Posts: 5
Joined: 02. January 2023 14:35
XAMPP version: 7
Operating System: Windows

Re: Running 2 xampp servers of different version?

Postby Nobbie » 02. January 2023 22:07

You cannot run the same public IP on two different PCs.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Running 2 xampp servers of different version?

Postby Altrea » 02. January 2023 23:56

the only way to achieve something similar is to build a proxy with this public ip and fotward the requests to the apache servers behind that proxy.

but why do you want to split on two different machines with the same ip?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11934
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Running 2 xampp servers of different version?

Postby merklijm » 03. January 2023 00:34

Hi Nobbie, thanks for your answer.

Is it nevertheless possible to serve one of its subdomains on a different PC?

PC1: public IP + subdomain_1, served by a Xampp1
PC2: only subdomain_2 locally, served by Xammp2

The private IPs of the 2 PC being linked by the host file and the subdomains by vhost
That way, only one public IP is used but one of the subdomain originates from another PC.

Is that possible?
merklijm
 
Posts: 5
Joined: 02. January 2023 14:35
XAMPP version: 7
Operating System: Windows

Re: Running 2 xampp servers of different version?

Postby merklijm » 03. January 2023 00:38

Hi Altrea, thanks for your answer.

The reason why :

I have 1 domain name, called domain.net, that has 2 subdomains: old.domain.net & new.domain.net

I installed 2 versions of Xampp (Apache+PHP) on the same PC (windows).
For the old.domain.net subdomain, the PHP code is old and needs to be rewritten, but it takes time. It can only be streamed on an old Xampp Apache 2.2+PHP 5.4. Because of this, I can't run it in HTTPS mode.
For the new.domain.net subdomain, the code is up to date and can run on a recent Xampp in HTTPS.

When I run the old version of Xampp, the 2 subdomains work, but only in unsecured HTTP.
When I run the recent version of Xampp, only the new subdomain works in HTTPS, the old subdomain is full of error messages because the code is outdated.

For that, I would like the old sub-domain to continue to run in parallel without error with the old Xampp, while I finish updating its code.

Is it doable?
merklijm
 
Posts: 5
Joined: 02. January 2023 14:35
XAMPP version: 7
Operating System: Windows

Re: Running 2 xampp servers of different version?

Postby Altrea » 03. January 2023 13:20

What i would rather recommend is install just one single XAMPP and add a second (older) PHP version to it.
I have written a step by step instruction for that years ago (unfortunately in german, but is easy translateable):
viewtopic.php?f=4&t=67753&p=232615&hilit=SetHandler#p232615
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11934
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Running 2 xampp servers of different version?

Postby Nobbie » 03. January 2023 19:16

merklijm wrote:Is it doable?


It is. But it depends on your infrastructure. If you are running a Router, which is connected directly to the internet and your two different PCs are running in the WLAN of your Router, you can redirect all incoming requests from Port 80 (= HTTP) to one PC, and all incoming requests from Port 443 (= HTTPS) to the second PC. Most Routers can redirect Port requests. For example. AVM Frtzbox can do it.
Nobbie
 
Posts: 13176
Joined: 09. March 2008 13:04

Re: Running 2 xampp servers of different version?

Postby merklijm » 06. January 2023 02:03

Hi Altrea,

It is surprising that Apache can play with 2 PHP. I will try this solution first but it is surely the most complicated because I imagine that it will be necessary to separate all the parameters of php.ini
I'll let you know when I implement this.

Thank you very much for letting me know about this possibility.
merklijm
 
Posts: 5
Joined: 02. January 2023 14:35
XAMPP version: 7
Operating System: Windows

Re: Running 2 xampp servers of different version?

Postby merklijm » 06. January 2023 02:14

Hi Nobbie,

I am exactly in this infrastructure configuration.
It seems to me a very interesting and easier solution. I'll try it if I fail to implement the solution of Altrea.
Also, for the cases of visitors who enter an HTTP address while the site is in HTTPS, I will have to duplicate the site on the machine receiving the HTTP/80 with redirection on the HTTPS/443 machine.

Thanks a lot!
merklijm
 
Posts: 5
Joined: 02. January 2023 14:35
XAMPP version: 7
Operating System: Windows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 204 guests