Are IIS 6.0 host headers active when site is stopped? - iis-6

I have an IIS server with 4 sites configured, using host headers and sharing the same IP. During a server move, I want to turn off the sites and display a holding page.
To do this I intend to create a 5th site with no host headers configured (ie a catch-all), a 404 handler with maintenance notice, and during the upgrade, stop the other 4 individual sites.
Question: When I stop the 4 individual sites, will this also turn off the host-header catchment so that all traffic is sent to the 5th site (maintenance page).
Unfortunately I currently only have access to an XP machine with IIS 5 to experiment with. I checked the MSDN articles, but they do not seem to mention what happens when individual websites are stopped.

Yes, when you stop a site on address $IP with a specified host header, its requests will pass through to a site with just address $IP. Your migration method will work just fine.
Example:
Site on 192.168.1.1, host header SpecialSite.local
Site on 192.168.1.1, no host header
As long as site #1 is running, requests for SpecialSite.local will hit it. Once site #1 is stopped, the requests will pass through to the "default" site for that IP, #2.

If it's only 4 sites (and I assume 4 domain names bound to those sites), why not just remove the headers from the source site, add them to the target site then reverse once the move is complete? No ambiguity about how IIS would handle that scenario!

Related

What would cause apache to redirect from a local IP to a remote IP address

Here's a scenario that I can't figure out; I simply can't understand why an slightly oldish webserver (totally inactive/powered-off for 2y) is behaving this way. I MUST be overlooking something quite simple.
Specifically, when i try to access an Apache instance on Centos 7 residing on my local network (192.168.2.XXX), the apache page responds just fine (Testing 1,2,3; Yay). Watching the access logs on this simple request shows up fine. On this same machine, I have four additional paths set up. One for example is a locked down phpMyAdmin that is accessible only from an internal IP. This route works fine, and the databases can be browsed, etc. Yet, for the other route, such as a wordpress installation or a route to a Magento instance, the the request comes up on the access log (no error log entry), and then just sits there. When the request finally times out, the URL in the browser changes to a new ip address (ABC.XXX.YYY.ZZZ), and then terminates any efforts.
Admittedly, the machine WAS originally configured to be outward facing, and my suspicion is that the IP to which the pages revert may have been the public IP last time the machine was alive. the IP is no longer associated with the site, and the domain which was likely setup with that IP address, is also no longer active.
Does anyone have any suggestions as to what I may look at? I have combed the httpd configurations and there is nothing resembling any such redirection address. Could there be some DNS data that needs to be flushed? A network configuration in sysconfig/ that I am overlooking?
It was nothing to do with my apache configuration. Everything was related to the site urls that were embedded inside the wordpress and magento installations. Upon finding and replacing all instances of the site IP address in some configuration tables, I was able to get both applications to respond properly.

Website not accessible externally following PHP upgrade

Bit of a strange one - Over the weekend I updated the version of PHP on one of our servers and all seemed to be working fine, however yesterday, we started to receive complaints that the site was down.
After looking in to it, the site works fine when connecting from the internal network, but it times out when trying to connect from an external IP address.
Server admin isn't really my strong suit, so not really sure where to begin. I've checked the httpd.conf files and all looks fine, the apache config test reutrns 'OK' so at a loss as to where to go next.
Server is running Centos, PHP 7.2 and apache 2.4.6.
How can I get the server to respond to external requests?
Andy
You can use this tools (metod) to check where is propably the problem:
I. on serwer, check :
whether is serwer conections to internet - ping, tracerout
whether page is loading (on local) - lynks, links (text web broweser)
whether your dns is working (or dns ISP prowider) - depending on the service used, e.g. BIND (check usage this tool in internet)
whether your firewall is ok configured and good work - depending on the service used e.g. iptables
whether domen settings is ok,
...
II. on computer, check: (in internet, not in local network with your serwer)
whether the website loads in the browser eg firefox after using ip address (your server where the page is located) in www bar
whether host in internet have a contact with your serwer - ping, tracerout
whether the website loads in the browser eg firefox after using ip address (your server where the page is located) in www bar
...
The problem is wery complicadet becouse I dont now what exactly you have an infrastructure and it is settings (network, ISP, etc.) which you on host the page you are writing about. For this reason, it is difficult for you to precisely help.

Apache Admin/Manager page lost after adding Virtual Hosts

I wanted to host a couple of websites (and apps) on the same VPS, so my idea was to have it like this:
Site 1
- HTML content only
Site 2
- PHP and HTML content
Site 3
- Java / SpringBoot app
Site 4
- Python app
Site 5
- Java / SpringBoot app
So I got the smallest pack on DigitalOcean, and thought I would start with Apache. Note: I configured the OS already, and tested basic functionality (see more info below)
I installed Apache, configured it to work with my domain (an actual one, not from hosts) and it loaded the basic HTML page. Before I did this, I tested my-domain.com:8080 and it showed the Apache Admin page, all fine. Unfortunately, now after adding my first VirtualHost (and deleting the default one), my Admin page is not accessible anymore (getting a timeout). I also used Let's Encrypt to test how SSL works.
The current state of sites-enabled:
000-default: NOT ENABLED, doesn't work even if enabled
my-domain.com: ENABLED, working with SSL, redirects to SSL by default
my-domain2-from-hosts-file.com: ENABLED, not working, redirects to the default domain
Ideally, I'd like to have a different VirtualHost/domain for each WAR deployed, but let's get the admin/manager page working first.
What could I be doing wrong? I can post logs and config if needed.
Turns out firewall was the one to blame. Port 8080 became blocked after I added Let's Encrypt SSL using their script, so... that's weird.

Apache sites do not have http:// prefix in address bar

I've setup 4 sites on a LAMP stack and pointed a number of domains at the server. Everything is running nicely but for some reason, none of the sites have the http:// prefix.
It isn't a massive problem but down-the-line, these sites are going to run https on secure areas and I want visitors to be able to differentiate.
Why would Apache NOT display the http:// prefix? I'm using named virtual hosts and have modified my /etc/hosts file to point the relevant domains to my server's IP.
It's most likely the browser hiding the http:// prefix. It should be happening on every other web site you visit with that browser, too.
You can't control this with Apache - but don't worry, in https mode, the browser will make sure the user sees the difference.

Browsing sites with their domain name from the same server they are hosted on

I have a co-located webserver(Win2k8) having a public IP and have hosted my ASP.NET website on the IIS. Though, I am able to browse everything else from the local browser(IE) installed on the server, the server somehow fails to browse the websites that are hosted in its own IIS when I access them using their 'domain name' set as a host header. For e.g: If the website is for "www.mywebsite.com", so naturally I have set the Host header property to "www.mywebsite.com" and when I put "www.mywebsite.com" in my IE address bar it fails to get the request.
Ok, so now why I need to access this website is that, I plan to send a Query parameter to one of the pages from another page of the same website.
Any idea how to get this working? Thanks in advance folks.
It may be trying to reach itself via its public IP address, which it may not be able to route to.
You can try adding a line into your hosts file (C:\Windows\System32\Drivers\Etc\Hosts, or equivalent) as follows:
127.0.0.1 www.mywebsite.com
Which will force it to access it via the loopback adapter.