Redirecting through IIS to another local server? - linux

I have a problem i cant seem to understand in IIS 7.5, OK here goes...
I have a website www.mysite.com that's hosted on my ISP, i have a sub domain drones.mysite.com that gets directed to my home server at IP address 1.1.1.1 which is managed by IIS on a windows 7 PC, i also have another sub domain of cloud.mysite.com that also get directed to 1.1.1.1, again looked after by IIS BUT i have a linux/apache server (on a seperate PC) and i want shop.mysite.com to be directed to the IIS server then redirected internally to my linux server.
From what i've read it needs to be done through HTTP redirect but i don't want to lose my original directed sites.
Any ideas, cheers in advance
Mark

Related

OVH VPS doesn't allow connection

I have a domain name at godaddy and I set it up so that it will redirect to my OVH VPS.
You should know that in godaddy it is possible to do the redirection in 2 ways.
1) - Redirection only (Forward only) and so once I go on my domain name (www.example.com) I am redirected to vpsXXXXX.ovh.net which is visible on the bar of my browser instead of www.exemple.com and I arrives on my site (web application installed on my vps) successfully
2) - Forward with masking, and here the difference is that vpsXXXX.ovh.net is not displayed in my navigation bar, it is still www.example.com which is displayed but my vps refuses to answer and i get this: vps719806.ovh.net does not allow connection .. on my browser.
What should I do to make OVH agree to answer?
Thank you in advance.
Solved by adding an A type dns record in my dns dashboard pointing to my vps #IP adress instead of using forward method.

Redirect a request to a colud server from a godady server with .htaccess

Hi everyone need your support with the following problem. Please do apologies if I confuse you in anyways with my explanation.
I have a add-on domain (example.com) pointed to a Godaddy Linux server, domain is also in the Godaddy same account.
The web application for "example.com" is a Laravel 5.6 based one, and the web app has 'Get' type search form which needs to be forwarded to another Windows IIS server's port with all the query strings where another web app is hosted. the action of the from will be similar to below.
Request => http://sub1.example.com/route/method?var=val1&var2=val2&var3=val3
From this point on-wards the application has to continue work from the IIS server with the subdomain, which mean I am not expecting any replies from this IIS server to the Linux server.
Its been advised to use the subdomain to mask the forwarding to the IIS server, so I did like above with sub1 sub-domain. This subdomain has to be forwarded to a server's port as I mentioned above, something similar to below.
http://sub1.example.com => http://xxx.xxx.xxx.xx:9596
I did tried with the Godaddy's default subdomain forwarding with masking, but the query strings are not being forwarded and shows "Destination Unknown" error.
In a online forum its been advised not to go with Godaddy's forwarding instead go with .htaccess to have more control.
Therefore any possible solutions or your support with the redirection with .htaccess from web application to the external web server's specific port along with the query strings would be a life saver.
Thank you in advance.
As per the GoDaddy support, the domain forwarding to a IP's port is not possible with the Shared hosting.
The support suggested to go-ahead with the VPS and configure.
Please do comment, if this is wrong statement!

How to redirect external internet traffic from my IIS express server to another external website host

I am trying to redirect traffic coming to my home server.
This should be such a simple task, but none of the samples I have found seems to do what I need.
I just want to bounce anything coming in for a specific url to a whole other server on the wwww. Preferably preserving the domain name in the process.
I have IIS 2010 express installed on the server. That does not seem to have HTTP Redirect installed. Control Panel not offering to install it either.
Maybe I can do this with the dlink router?
I am running windows 10. On Win 7 I could create a website that redirected to a new url, but for win 10 no can do.

IIS 7 IP address forwarding

I want to move some websites from server 1 to server 2.
My clients have A records pointing to the IP address of server 1. Without updating their DNS records, how can I automatically forward request for those domains from server 1 to server 2?
Thanks
Graham
This image is from an article regarding Exchange, but the IIS settings are relevant.
You can redirect at the HTTP level by specifying a URL redirect in IIS's HTTP Redirect settings:-
However, for this approach to work you will need a new domain for your sites. e.g. if the A record resolves www.example.com to Server 1 you will need to redirect to another URL (e.g. www.example.edu) that already resolves to Server 2.
Another option is to setup a reverse proxy using IIS on Server 1:
Today there was a question in the IIS.net Forums asking how to expose two different Internet sites from another site making them look like if they were subdirectories in the main site.
So for example the goal was to have a site: www.site.com expose a www.site.com/company1 and a www.site.com/company2 and have the content from www.company1.com served for the first one and www.company2.com served in the second one
So slightly different requirements (the article only wants a subdirectory rather than the whole site), but the same concept will apply.

How do I redirect to a shared virtual hosted site in the hosts file?

I want to change my hosts file to redirect a web address to my site...
normally I would just do... ping mysite.com then in the hosts file, if the IP came out as 99.99.99.99, I'd write...
99.99.99.99 siteiwanttoredirect.com
But in this case my site is on virtual shared hosting... which means the IP I get back from the ping is the same as a few other sites and if I type that IP in the address bar, www.mysite.com won't come up. Here's a bit more details: someone who asked a question about why pinging it wouldn't give the correct IP.
So what I would like to know is... if you're on virtual shared hosting, how can you specify redirects to your site in the hosts file?
Thanks,
Matt
You cannot. With the hosts file you can change the IP address, but your shared hosting provider needs the HTTP Host header to be set up correctly -- which in your case will still be siteiwanttoredirect.com and not mysite.com . Your hosting provider will therefor not know who's site to show.
What you could do is redirect to some host you control (f.i. localhost) and run a proxy server there. If you set up Apache on your machine, with a virtual host for siteiwanttoredirect.com which does a reverse proxy to mysite.com , it should work.
This is handled via the host header of the website, and not anything on your local machine, like your hosts file.
I would make sure your host has that set up, then as long as people visit your sit via the website name, and not IP, everything should work.
On a shared host, the website you get is determined by the domain name you ask for thanks to the Host HTTP header. For this to work properly the web server needs to be configured correctly so it knows what website to serve in response to which Host request - this is usually called 'Add-on Domains' on CPanel driven shared hosting.

Resources