1

I'm hosting two new wordpress VM on my network. (on one computer) see this diagram on imgur

I would like to access them by different url/domain name

for example WP1.mydomain.com & WP2.mydomain.com

or myfirstDomain.com & MysecondDomain.io

--

Those WordPress are running under https. I tried an url redirection from my domain name registrar. but this lead to a blocking error :/ in the browser (firefox) as you can see there are no way to go further.

If I enter directly my public IP:port (for redirection) I get almost the same error but at least I have(Accept the risk and continue)

I understand why those errors occur = https

I'm looking which solutions exist to circumvent those error.

Is a reverse proxy is the only one solution ??

SpongeB0B
  • 11
  • 2

3 Answers3

0

A way to solve your issue is to apply transparent URL forwarding to both myfirstDomain.com & MysecondDomain.io, and point them to WP1.mydomain.com & WP2.mydomain.com respectively.

Implementing this concept from scratch can be challenging and time-consuming, therefore, as an alternative, you can use an existing solution.

This configuration guide explains how to quickly configure a transparent URL Redirect from a Source domain to a Destination domain with the possibility to set custom SSL certificates. This method is also very secure since it does not use any Frames or IFrames.

A configuration example suitable to myfirstDomain.com would be something like this:

  • Source Domain = myfirstDomain.com
  • Destination Domain = WP1.mydomain.com
  • SSL Certificate = Valid certificate for myfirstDomain.com
  • Force HTTPS = yes

for MysecondDomain.io you could do the same steps.

0

You could refer to this answer posted by another user, however it's not a complete solution and can be a bit finicky. https://serverfault.com/a/460269/551976

I would simply suggest hosting the two WordPress servers on a common linux server with subdomain redirects added in the apache config file. So each subdomain or domain would point to the respective WordPress folders in the linux server.

If you're not sure how to do this you can refer to a WordPress web server hosting tutorial online as that would take a while to learn and would be a bit long to explain here but it would give you your desired result.

Brandon
  • 1
  • 1
0

You will still need to obtain certs for myfirstDomain.com and MysecondDomain.io, and have your web server set up to serve those domains on SSL port 443. Get that working first.

On myfirstDomain.com use this index.html:

<title>Your Page Title Here</title>
<frameset frameborder=0 framespacing=0 border=0 rows="100%,*" noresize>
  <frame title="secure content" name="myframe" src="https://WP1.mydomain.com" noresize>
</frameset>
<meta http-equiv=refresh content="0; url=https://WP1.mydomain.com">
<a href="https://WP1.mydomain.com">WP1.mydomain.com</a>

On MysecondDomain.io use this index.html:

<title>Your Page Title Here</title>
<frameset frameborder=0 framespacing=0 border=0 rows="100%,*" noresize>
  <frame title="secure content" name="myframe" src="https://WP2.mydomain.com" noresize>
</frameset>
<meta http-equiv=refresh content="0; url=https://WP2.mydomain.com">
<a href="https://WP2.mydomain.com">WP2.mydomain.com</a>

With this set up, hits to https://myfirstDomain.com should display the content of WP1.mydomain.com, and hits to https://MysecondDomain.io should display the content of WP2.mydomain.com.

Jim L.
  • 655
  • 4
  • 11