Sub site mapping in IIS - linux

I have a site www.test.com hosted in IIS(Azure VM). I have a WordPress site hosted in Apache(Linux VM) in another server.
I need to map www.test.com/example to the WordPress site.

You have a couple options that come to mind:
Have IIS on Windows IIS box in Azure redirect that path to your other Wordpress site. This won't change the DNS name of the Wordpress box but will simple just redirect.
Use a web application gateway in Azure(article) or some other web routing appliance (VM) to act as your termination point for the www.test.com traffic. Then have it redirect that URL path to your Linux VM. In the containers world this is done with an Ingress controller.

Related

Cannot get IIS URL Rewrite/HTTP Redirect to work on Intranet Web Application

I am trying to get a working web application that is accessible by typing in a browser "servername/appname" to be accessed with "servername/differentnameforapp". I've configured a New Site in IIS for this "differentnameforapp" and set an Inbound rule with the redirect URL to our Webserver's internal IP address. When I type in the new pattern in a web browser, it goes to the main IIS landing page instead. The "appname" appears as a sub-folder in our Default Web Site in IIS. I added a DNS CNAME for this "differentnameforapp" to point to the IP of our server. Still just lands on the main IIS page.

IIS redirect subdomain to other local server

I have two server with IIS sites on it.
XXX.YYY.Z.10 (to sites)
XXX.YYY.Z.20 (one site)
I have also domain.com forwarded to my public IP and NAT forwarded all to first (.10) server, which has 2 sites on it. It works great. I would like to open worldwide my 3rd site which is localized to second server (.20). When I add DNS A record for my2site.domain.com to my IP I see only main site from IIS. When I shut down my second server I also see that site, so I think I see default site from server one (.10). How can I redirect from there address Mysore.domain.com to my next server (XXX.YYY.Z.20)? Some URL rewrite?

Azuure app service and GoDaddy domain

I am newbie in web hosting. I have a domain name on GoDaddy www.mydomain.com.
My web app is hosted on Azure App Service myapp.azurewebsites.net.
Now, I have configured my GoDaddy domain to point to azure web app. Azure app service is configured to accept request from www.mydomain.com, so anyone accessing my domain www.mydomain.com can see the app hosted on azure. This thing is working fine.
For example, I enter a URL www.mydomain.com, I get the expected result - web app hosted on azure with the www.mydomain.com URL in browser. The issue is, if I enter only subdomain name i.e. mydomain.com - without WWW prefix, I get the web app running on azure, but the URL gets replaced by azure app service URL myapp.azurewebsites.net.
What could be wrong here? My domain is configured for CNAME, and Azure App is also configured to accept custom domain with CNAME. Should I use A Record settings so that if I enter mydomain.com it gets replaced by www.mydomain.com instead of myapp.azurewebsites.net?
Thanks in advance!
As per the documentation , it is recommended that you use a CNAME for all custom DNS names except a root domain (for example, contoso.com). You can also add/register your url without the "www." prefix, to set up another record in order for Azure to verify.
For more details, refer to the blog post in case if you haven’t checked earlier.

How can I access files on a remote server from a vpn with same web addess

I am hosting a web app on a Digital Ocean VPN. I set up an A record via GoDaddy to point my domain to the VPN server. I'm wondering if there is a way to still access public files from within the web app that I have on GoDaddy shared hosting at that same address.
I basically want to access a file at http://example.com/uploads/somedoc.pdf
Which would be at the following path on the GoDaddy server:
home/site/public_html/uploads/...
But example.com now points to the VPN. I tried using the GoDaddy website IP address instead in the URL but that doesn't work either. I get a 404 file not found error even though the files are actually in the uploads folder. I figure it's looking for them on the VPN instead.
In case anyone else runs into this problem I solved my issue by simply adding an A Record for a subdomain in my DNS zone file and I was able to point my VPN server IP to that subdomain. So with my web app being served at app.example.com I was successfully able to access the files on the GoDaddy shared server from my web app (ie example.com/uploads/somefile.docx).
To ensure that the client would still visit the web app at the new subdomain I setup a permanent redirect to send all traffic from example.com to app.example.com instead of them having to remember to type the subdomain each time they want to access the web app.

Azure Web App Service - How to force non WWW to go to WWW?

I have an Azure Web App on the Standard App Service. I am able to access the site by going to http://www.websitename.com but unable to access the website via http://websitename.com.
How can I get the web address with the non www. to go to the www. version?
In my DNS Configuration for the domain my A Name record is pointing at the IP Address of the Web App in Azure, and the CName record at the Azurewebsites.net domain.
In the Azure portal, you will need to add both www.websitename.com and websitename.com as host names for the Web App, so that Azure knows to send traffic to it.

Resources