Apache (port 80) and iis (port 8080)

You need the following:

http://subdomain.test.co.uk/newsite --> redirect to apache port 80 http://subdomain.test.co.uk --> redirect to iis on port 8080 

IIS changed to work on 8080, and both sites work fine using localhost.

Also included the following in httpd.conf

 LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule rewrite_module modules/mod_proxy.so 

Then the following is added to httpd-vhosts.conf

 <VirtualHost *:80> ServerName subdomain.test.co.uk ServerAlias * ProxyPreserveHost On ProxyPass / http://127.0.0.1:8080/ </VirtualHost> 

but the content does not load if the goto domain - please inform TQ

+5
source share
3 answers

It looks like you need to be able to redirect from both. If in the "root" folder and in appache, redirect to iis (port 8080). If in a subfolder and in iis, then redirect to appache (port 80).

So, in IIS, you can create a subfolder and set it as an application. Then in it go to HTTP redirect. And this should work on this side of things. (I usually do this by having an HTTP site that redirects to an HTTPS site, thereby forcing HTTPS.) Just provide the port number in your case. And you have to start on the right path.

But to be honest, I would put them differently. I would use a subdomain for the purpose you want to do with folders. I will have newsite.test.co.uk; if this is an option, as this will make me more comfortable.

Or, if you continue to move in that direction, I installed IIS on port 80 and Appache on port 8080, placing the base site in the default port and the new site in the new port.

on this topic:

How to configure subdomains in IIS 7

How to redirect a site to another location in IIS7

Apache Redirection

https://www.digitalocean.com/community/tutorials/how-to-create-temporary-and-permanent-redirects-with-apache-and-nginx

0
source

If you use vm, you can add another network card and give them a separate IP address, and then in your router you will configure each port to switch to a different IP address

0
source

You also need to have an entry in the hosts file, which will be located C:\Windows\System32\drivers\etc Open this file in notepad or in any other text editor and another entry, as shown below in the last line of your file, and then try again.

 127.0.0.1 subdomain.test.co.uk 
-1
source

Source: https://habr.com/ru/post/1267106/


All Articles