If I have a website at myFirstDomain.com/dir/, is it possible to get mySecondDomain.com to point to myFirstDomain.com/dir/ so that when users browse at the directed site, they only see mySecondDomain.com/potentialSubDirFromMyFirstDomain/ or how does it work?
Ok good.
Well what you'll need to do is make use of IIS 6.0 Host Header Filter.
Essentially in IIS you will have your default web site which is currently serving myFirstDomain.com.
With Host Headers, we can add another web site which is mapped to the location of your subdirectory and will only be visible if the user enters via 'mySecondDomain.com'.
So in a nutshell we are getting IIS to host multiple sites on one box. I'm not too familiar with the process in IIS 6.0 since all I use is IIS 7.0 which is not available on Windows Server 2003.
However, the following links should help you implement it in IIS 6.0:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/b77cf015-017f-489c-9b5b-65ca4a679392.mspx?mfr=true
http://forums.iis.net/t/1120787.aspx
http://www.goarticles.com/cgi-bin/showa.cgi?C=188629
The idea is that when a user types 'mySecondDomain.com' it will add this 'host header' into the body of the HTTP request from the browser to IIS, IIS will then read this value and check to see if any of the website(s) contain a match for the host header and redirect the user to the appropriate website, thus mySecondDomain.com will appear as though its on its own server (which it technically is anyway.)
From what I remember the host header attribute only exists in the HTTP 1.1 protocol, HTTP 1.0 does not support it and will not send the host header to IIS which means the default web site will be displayed instead...(regardless of what domain you come in from). I'm pretty sure most browsers are using HTTP 1.1 though.
A safer way would be to bind each web site via IP address... but for this you will need multiple internet ip addresses on one box - I've never had a problem with host headers though!
Firstly, I think your going to need direct access to the web server... are you using a VPS/Dedicated Server or Shared Hosting?
Windows Server, Linux?
It is not possible at all with the DNS. You will have to set up a HTTP redirection (no experience with IIS so I cannot help here, just suggest you to drop the "dns" tag).
Related
I have created two test websites in IIS. one is called testapp.com and other is called anothertestapp.com.
In my host files both testapp.com and anothertestapp.com is pointing to 127.0.0.1
both apps are loading perfectly in browser and show their respective contents.
The question however is, how does IIS knows that testapp.com is different than anothertestapp.com. I mean when in browser I type two different domains they both actually are pointing to same IP (127.0.0.1), how does IIS map that to two different websites correctly?
When your browser loads a web page, one of the request headers it sends is the text of the domain name you typed in. This is the "Host" request header. IIS uses the value of this header to pick which web site will serve your request. The "bindings" on your IIS web site let you configure its host headers.
Here's another question that explains the "Host" header in more detail:
What is http host header?
We have an intranet server that hosts many web applications / web services in various virtual directories all located under the default web site in IIS6. These all just use http connections on port 80 e.g. "http://ourintranetsite/applicationname" or "http://ourintranetsite/servicename" etc.
We have a new web service that we have deployed to a virtual directory under the default web site and it works fine using an http connection. One issue has arisen now that we are starting to use SharePoint Online. We want to be able to call this web service from some client site script on a SP Online page, but it is causing an issue because the SP Online page is using https, so it doesn't like calling a web service over http (IE just puts a warning message in the browser console, but Chrome refuses to make the call at all).
Is it possible to configure just the virtual directory hosting this web service to require an SSL connection rather than setting it at the web site level? We really don't want everything under the default web site to start requiring https, just this particular service. Obviously I could just tick the "Require secure channel (SSL)" option in the properties of the virtual directory, but from what I understand (I've not had to use SSL before), the default port for that will be 443 while the website is using port 80. Ideally we'd just like to be able to get to the service with something like "https://ourintranetsite/secureservice/..." while not impacting any of the existing http applications and services.
No it's not possible to assign a certificate to virtual directory, however when you add a cert to the website all it does makes the site brow sable over https but that doesn't mean that it has to be browsed only over https.
What I meant is you can have site to be brow sable over http and https. Add the necessary cert to the site and make sure you do not check "Require secure channel (SSL)" and it should be good to go.
On the application server (windows 2008 r2) we have our site (XYZ) hosted in IIS. Our site XYZ uses port 80 and 443. We had removed Default Web Site from IIS since we didnt need it. Now we want to use MSMQ with Internet Messaging.
I Googled and found that MSMQ setup is designed in such a way that "MSMQ" virtual directory will always be created under default web site. So I added Default Web Site manually and set hostname for it (without hostname it wouldn't start as XYZ also uses port 80) and did IIS reset. Then enabled MSMQ HTTP feature, however, "MSMQ" virtual directory still gets created under our site XYZ.
Note: XYZ was created before enabling MSMQ HTTP support. I am not sure if the sequence matters!
May have to change the website ID.
This Blog post should help.
Looks like setting host-name for default web site did a mess. I removed host-name and set site (default) to work on port 8080. Then referred it like http://server:8080/MSMQ and internet explorer returned HTTP 501 error which is what I wanted. Tried posting actual message too and yes it worked.
I installed an ASP.net application on a windows Azure VM (IIS 7). SSL certificate is installed, configured and the application works correctly. I have removed Http binding and http endpoints.
The issue I am having is that if I use the cloudapp.net link (using https), the application still opens with a mismatched certificate.
What can I do to deny any user from opening my application using https://xx.cloudapp.net/x?
It seems really silly that people are saying this isn't the right place for this question, since some of the solutions could be code related. ie: In your application, check the host and if it's cloudapp.net, do a URL redirect.
There's a few different options here but it sounds like what you're looking for is just the ability to prevent someone from viewing the application using that URL.
What I would do is set up a site in IIS that uses Host Header resolution to look for xx.cloudapp.net. If that URL is recognized, do a redirect using the HTTP redirect settings to the https version of your app. Don't bind the SSL port to this site or you'll run into SSL errors like you showed above.
The other option is to leave it out entirely and simply use the Host Header resolution to filter out requests for your site. I suspect what you've done is assign all incoming requests to the only IP address on the system, which is why the xx.cloudapp.net is showing your app and the cert is failing.
This would cause xx.cloudapp.net to fail to show any site at all but I think that might be what you want to do anyway.
We have a local instance of IIS 7 running with a website. Instead of the default "localhost" we have something like, mysite.compname.com. This is a separate entry into IIS 7 and the default website was removed to prevent confusion.
Then in our host file we an entry like this:
127.0.0.1 mysite.compname.com
Now when I try to hit this url, http://127.0.0.1/ApplicationName/Project/AddProject.aspx technically it should work, but instead I get a 404. I can vouch that this isn't a problem with the application, because if I navigate to http://mysite.compname.com/ApplicationName/Project/AddProject.aspx it works fine.
My end goal is to be able to give someone my computer name, so that they can visit a test page, so the url above I think would get turned into this http://computername/ApplicationName/Project/AddProject.aspx. Any help or at least links to understanding would help because I'm not sure where my issue is coming from.
It sounds like the IIS site / application is configured using a Host Header.
This means that the site will only respond if the host header sent by the browser matches the one configured for the site.
This is a standard method to allow one server to host sites for many host and domain names.
If you wish to allow others to view the site on your computer you will need to either have a local DNS server which you can edit, or, probably the easiest option, get them to edit their host files to include
<your IP> mysite.compname.com.
Remember to open the requisite ports (probably only 80, maybe 443 for https) in your firewall.
Or, you can try to edit the site config to remove or modify the Host Header requirement. See the first link for details, but be careful, it's easy to break things if you don't know the entire architecture of the site.