Apache proxypass caching? issue - apache

We have 3 servers: a gateway machine, and 2 other hosts (old and new).
Originally, the gateway machine was serving a django app hosted on OLD via proxypass. We are shutting down OLD and have moved the app over to NEW.
On NEW, the app works fine when accessing the host directly (http://IP.FOR.NEW/site)
However, when trying to access via the gateway (so that users don't have to update links/learn an IP/etc), accessing via http://gateway/site gives an LDAP error.
HOWEVER, it's not LDAP that's the issue. The OLD server used LDAP, while the NEW server is simply using the django user system. As a result, all LDAP references were removed, and it works when accessing it directly.
It looks like when accessing via gateway, it is serving the old code but trying to point it at the NEW server. If I stop apache on the NEW server, access via the gateway fails with 'service unavailable'.
As far as I can tell, caching is not enabled on either server.
edit: I tried changing the user facing url (gateway/foo to gateway/bar) which is redirected via proxypass to NEW/site. No change. Still appears to be serving old code on the NEW server.
Any suggestions on where to start looking would be appreciated.

Related

Nginx reverse proxy works only outside lan

I have a server which has multiple "app pages" running on it. (for example: Home Assitant, Cockpit etc.).
On the local network I can access them using like http://192.168.1.200:8123.
I used to use port forwarding but I didn't wanted to remember ports so I'm using Nginx Proxy Manager and a DuckDNS domain.
So now outside of the local network I can type https://ha.mydomain.duckdns.org, which works fine, but if I'm connected to the local network my browser throw a PR_END_OF_FILE_ERROR message.
I tried it with multiple devices, different applications, even on the home assistant app, and got the same result.
I'm using SSL certificates created in Nginx Proxy Manager, but when using http I get an 404 error.
After long searches I found that I probably need a custom local DNS (like pihole) running, and my router DNS has to point to it. I'm not sure if this would even solve my problem, but I would like to avoid this method, cause if my server shuts down or has any problem, it would cause problem on all the devices in my network.

Rerouting of server from local to amazon?

I'm setting up a new server on AWS, everything is working as expected. but I recently found out that in order to be elegible for business in my country I need to have the server be local. Is there a way I would reroute the server on request? like point to local IP, but all the rest api/admin panel would show/result AWS server?
This is a new problem for me, have not tried anything.

Browser cache redirecting me to different website

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?

Issues while accessing Jenkins using IP address vs DNS Name (with AD integration)

Noob Question:
I have a Jenkins instance setup on an internal team domain (with our own DNS/AD configured). This domain is inside the intranet.
We have security enforced on Jenkins using the Active Directory plugin. Therefore, all users login with their AD credentials for an actions like triggering a job, etc. Viewing is open to all.
We access the Jenkins instance using the DNS name (http://jenkins.team.company.com:8080). However, when accessing certain jobs, the address changes to http://10.XX.XX.XX:8080/../..). At this point, the users' logged in sessions are also terminated.
I am at a loss about what is causing the sessions to get lost.
(in the spirit of full disclosure - this Jenkins instance does not have an nginx or apache running in front of it. Until recently, this was my own local Jenkins instance but now the ask is to get everyone to start using this. I am wondering whether setting up nginx or Apache will resolve the problem. You can tell that I have none or very little background with running Web Applications)

forwarding HTTPS from Plesk to AWS EC2

I'am quite new to setting up and managing websites, domains and stuff.
I purchased a domain (let's say example.de) and registerd it on my vserver running Parallels Plesk. As I need secure access I requested and created a SSL-Certificate at startssl.com. The developed application (Spring-Boot) runs on an EC2-Instance at AWS. The Product-Website runs on an Apache-Webserver on an EC2 instance. I need to secure both, the App (app.example.de) and the Website (example.de) using SSL.
What I want to archive is a redirect from the domain https://example.de to the EC2 Instance. I already tried several things - some I remember from the try&error marathon
Configure Plesk frame-forwarding the traffic on https://example.de to the ec2-ip
Obviously the Browser warns me that the Certificate is issued for example.de and not for and classifies the traffic as unsecure. Same like when accessing it like https://...
I also uploaded the certificate at Plesk - Also without success
Is there a solution for my setup? Or do I need (or is it recommened) to use Amazon Route53 for that task? Would be nice if someone could guide me and provide some tipps as I am pretty new to this topics.
Thanks
It seems there is no way around AWS route 53.
I figured out that there is a Extension for Plesk that is designed to route traffic using route53 and even a nice manual article at the Plesk homepage how to use any external DNS and also Route53 Extension. As this Extension requires a newer version of Plesk, than that one I am using I wasn't able to install it. I am pretty much bound to this version, so an update didn't come into question. I cannot tell for sure if using this Extension solves my initial problem, but it seems to be a potential solution.
The most simplistic solution (at least for me):
I ended up moving my Domain the AWS, created a Hosted-Zone, Added a Record Set with the IP of the EC2 and the DNS Server provided due the hosted Zone. Everything is now working like a charm.
Some more Background: The Product-Website and App-Frontend are running inside an Apache where I installed mod_ssl and configured SSL access. The Application backend runs as a Spring-Boot-App in a Tomcat where I also configured SSL using a TomcatConnectorCustomizer.
This setup works for my scenario