Browser cache redirecting me to different website - apache

I have two Wordpress websites hosted on two different servers and wish to consolidate these to be hosted on one server.
I've successfully transferred the database and website files over and setup the new virtual host in Apache.
Before switching the DNS over to the new server, I like to confirm it is working by altering my hosts file (I'm on Windows) to point to the new server:
xxx.xxx.xxx.xxx example.co.nz
I can verify this by running ping example.co.nz and see that it is correctly pinging the IP address specified in the hosts file.
The strange thing, though, is that when I go to example.co.nz in my browser, I am redirected and served the other website that was originally on this server; othersite.co.nz.
But if I open my Chrome Dev Tools, which has the cache disabled, then I am served the correct site.
Is this just a local caching issue or will other users trying to access the site be affected by this? Is there a way I can verify this, perhaps externally?

Related

sending local data to web browser... how?

I have a deployed SSL website displaying maps.
I have a local application (flight simulator) which spits out location data.
I'd like to have the browser's map update itself based on location data. Not just for me, but anyone running this local application should be able to see their location on their browser.
websockets won't work because the webapp is SSL & one cannot connect localhost or 127.0.0.1 with SSL websocket and insecure websockets are blocked. (Using DNS tricks and deploying certificates won't work because it should support "anyone".)
Using javascript File API with a UNIX domain socket won't work because, while I believe javascript can read domain sockets, there's no way for a User Browser to 'select' a domain socket as a File object.
The only pathway I see is by having the local application pass data directly to my webserver & have the webserver forward it to the appropriate browser. (Say, when local application is started, user provides their webapp login & the webserver will be able to pair incoming location data with user's web session.)
Is there another way? (a different path, or different configuration to permit websocket?) Seems too bad that localhost doesn't get a free pass with respect to security.

Not able to access my web application outside the server (apache)

I have setup a mapping application on a Windows 2012 server, with apache web server. The application is accessible using this URL within that server. But not able access outside the server.
I have given the IP in apache .conf file for the "listen" parameter. Hope that is fine.
The IP is pinging is pinging from the local machine.
The hosting support confirmed there is no firewall blocking the access.
What else should I do to correct this?
The IP address, is it static?, and are your cgi settings configured properly and the permissions on your directories within the website?
Are you receiving any forbidden access or other related errors?
Your Apache httpd.conf, your php.ini, and your user.conf files should all be checked along with configuring the correct permissions on files and directories.
*Note: Edit config files with sudo, restart apache after making changes.

How to set a custom website name instead of ip address for local computer?

I can point a url to a directory in my computer by setting /etc/host and /private/etc/apache2/extra/httpd-vhosts.conf files. For instance, when i type sample-app.com in my computer, website under /Users/azad/works/sample-app.com folder is running.
When someone type sample-app.com in another computer in same local network i want to display the same website located on my computer. Is this possible?
By the way, i don't have access to any computer in the local network and i can't do any configuration.
Mac 10.7.5 (I am using mac but if windows is better for this purpose i can use windows too),
PHP 5.3,
Apache 2.2
If you want to accomplish this on windows, use the hosts file on the computers you want to point at that sample-app.com URL mapping your IP address to that URL in all the computers you want that to work on. Then make sure your HTTP server is configured to serve that website under that host name for port 80.
Since you aren't able to configure the local network, the best way to handle this situation is to configure a host name with the website domain's DNS server, such as dev.sample-app.com, which points to the local IP address (seeing as how its on the local network) of the computer hosting the website. This will then allow other computers on the local network to enter this host name to access the webiste.
If you had control of the local network's DNS server or control of the proxy (if they have a proxy), there would, of course, be other options.
Update:
Since you mentioned in your comment that you have control over the DNS server, here is how you could accomplish your goal via the DNS server. First, add a forward lookup zone for sample-app.com to the DNS server. Second, configure the default host for the zone to point to the computer serving up the website content. Now the client computers will resolve the local IP when the user enters sample-app.com into their web browsers. If you need to continue to have access to other hosts on sample-app.com, you might want to try asking about it on serverfault.

Site down but SSH and FTP work ok

Haven't changed anything since it last worked (last night). Can connect via Putty and FileZille but none of my /www/ files work in web browser (Problem loading page). The IP also pings fine.
I've tried accessing site using both domain name and IP.
I've restarted apache2 as as well as the actual server, no luck.

Access external url on web server

If I log in to our web server using RDP, I can't access any of the sites we run on that web server via their external url. For example, say my web server hosts www.example.com, when I log in to the web server, bring up a browser and try to go to www.example.com, I can't see it.
However, one of our sites was configured in some way to work like this, if I try to go to that url, it works as you might expect.
Unfortunately, this was done by our server hosting partners, who we are no longer in contact with. Does anyone know how this can be achieved?
You can do it in many way..
It depends on your network configuration, but it could also be a simple row in hosts file or a static dns record or a specific route for that ip address.
if you're using IIS you should also set the website to "listen" on the loopback interface in the bindings menu.
or, for IIS 6: