multiple request from same ip on Server logs - apache

I implemented a client side interface which makes a service call to the server using JS in an http GET. When checking my access logs, I see that sometimes, I get multiple requests sometimes as many as 6 within a second-- Making the very same request-- from the same ip -- what do u think this tells ?
Thanks

It might tell they're behind a proxy. (the IP you see is actually the proxy's IP)

It could be 6 different computers behind one router, all visiting your page. Or 6 tabs on one browser of one computer. Or a bug in your JavaScript?

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.

get hostname of remote clients accessing my website using vb.net

I have a Vb.net based website which is a pretty old one can't upgrade it.
I need the hostname of the clients visiting the website.
On page load of the login page I am calling using this which gets me the client's hostname who's accessing the website.
System.Net.Dns.GetHostByAddress(Request.ServerVariables.Item("REMOTE_HOST")).HostName
I am logging the details into my Database which is similar to the below
172.xx.xx.xx ltp-017 RUPESH
I have no problem catching the IP address and hostname of devices accessing my website from home network but when a device(including mobile devices) is accessing from outside my home network the above code does not catch the hostname.
Is there any other option or programming language which I can use inside my VB.Net to achieve this?
Any ideas to get this work is much appreciated.
Thanks for your time in advance.
Request.UserHostAddress gives the IP of the connected remote client.
https://learn.microsoft.com/en-us/dotnet/api/system.web.httprequest.userhostaddress?view=netframework-4.7.2

Can a website be cached anywhere other than a browser's cache?

My client is seeing a different version of the website on his computers then what I am seeing on mine. He claims to be deleting the cache. I'm using Safari with the cache disabled via the Develop menu and I see the correct version of the site.
Is it possible that the website is somehow cached by my client's ISP or something along those lines?
Update:
I think I need to describe the problem better:
My client has a web hosting package where he has his domains and email accounts. somedomain.com has it's A record changed to point to Behance's ProSite hosted service.
The problem is that when he goes to somedomain.com he gets the index.html that's sitting in his web server's public_html directory, and not his ProSite. Using the same domain I see the ProSite. He has cleared his cache and tried on a computer at home with the same result. This is what lead me to believe that there is some sort of caching issue somewhere along the line with his ISP(s).
Is there anything I can do about this?
Proxy servers at the ISP or even the client's site might do this. Or even network-compressors in some (mal)configurations.
Depending on the site you might also be seeing actually a different site. e.g. Google redirects to different servers using DNS load balancing.
Yes, you're right. To improve performance and the speed in loading page from the same request modern browser seem to great at caching. I myself have the same problem as well. To resolve this problem You should tag version of your projects whenever you deploy them to production.
Based on the update, the problem was with DNS cache.
DNS can be cached at the following levels:
browser
operation system
router
DNS provider
And each of them has its own way to flush DNS cache. Except DNS provider where the only thing you can is to wait for cache invalidation. Though you can replace your current DNS provider with another one who won't have your domain in his cache. You have all the chances to find such if your domain isn't popular.

Web-page redirection

I am trying to achieve the following:
when a user types "print" (or "http://print") in the address-bar of the browser :
I want the user to be re-directed to a page : www.abc.com/print/
How can one achieve this ? I tried to lookup some squid configurations but was unable to find the same.
Thanks!
Edit : I do not understand the deal with down votes, this is a perfectly valid question.
If you want to enable a user on your LAN to type "print" in the address bar and be redirected to a given hostname, you'll have to supply a DNS record to that effect. This is not accomplished on a web server, nor is it web development in any respect.
There are several methods to resolving a given hostname to a given IP or to another hostname. One way is to edit the client hosts file, as described in another answer. One could also, if you have a DNS server running within your LAN environment, add A records to this effect.
You must understand how hostname lookups work from a browser. When you type something in the address bar, your browser uses your operating system to resolve the hostname to an IP address. Your operating system uses its hosts file, internet connection, and other mechanisms to accomplish this. This process itself has several tiers and steps that are outside the scope of the browser and which cannot be influenced by the browser. Nor will arbitrary web servers be consulted in this process. Your aim is to inject something in this process that resolves the hostname "print" to the webserver of your choosing - THEN web development might come in to play.
See: http://www.quackit.com/how-websites-work/how-dns-works.cfm

Are IIS 6.0 host headers active when site is stopped?

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!