Apache on Jammy

14 views Asked by At

I'm running Apache/2.4.52 (Ubuntu) on two desktops/servers with Ubuntu 22.04.3 LTS (jammy) in two different locations. One of the locations has a NAS drive, which is mounted as NFS by both of the desktop servers, with one of them using VPN to connect to the other site.

I left all the HTML, CSS, pics and JS files in a directory on the NAS and created a soft link between /var/www/html on both of the desktops/servers and the NAS directory. This way when I moved between the locations all of my files were in the same place. And I wouldn't have to worry about updating the files. It worked beautifully for a month or two, until last week when suddenly Apache refused to see the changes I was making to html files. Sometimes I couldn't figure out where Apache was getting the HTML.

I'm expecting to be able to open the files on /media/NAS/blah/html, work on them, save them, and then go to either of the two apache servers and get the same output. I'm not getting that kind of love from Apache lately. It worked for a long time, but it doesn't work anymore or works partially.

I am expecting to click ont he refresh button, especially if I hold the ctrl key, and get the latest edits on my screen, regardless of which machine I go to. For example, I can RDP from server A into server B and run firefox or chrome, and expect to see the same output because the files are in the /media/NAS/blah/html and soft linked to /var/www/html on both of the servers.

Holding control key and clicking on refresh sometimes works, sometimes not. I have forced synced the filesystems with sync and reboot. I have updated the .htaccess file in /var/www/html directory to force it to update, but still the same. Say I'm on server A and I go to localhost and I get version 1 of HTML I worked on two hours ago; if I RDP into server B and look at how apache sees the file locally, I might get another version of the html file; and even more puzzling, if I tell my browser to go to the VPN address of the other server, I might get another version of the HTML. And yet, soemtimes, with no explanations, all the canaries are singing the same song!!!

Can anyone shed any lights on this? Please! Is it NAS and CIFS and soft linking?

0

There are 0 answers