I’ve had the unexpected privilege of transferring some a web application over from a CentOS Plesk/HTTPD server environment over to an Ubuntu Apache2 VPS server. The web application contained your standard CSS, images and javascript folders.
However the most puzzling thing occurred where when I configured Apache2 to run the web application, the /javascript folder could not be read even though it was physically there and in the right place. After spending two hours attempting to remove .htaccess directives, modifying CHOWN/CHMOD permissions and double checking the Apache vhost.conf file, it came down to a .conf file configured in the default Apache2 setup that was rewriting the ‘Alias’ path of any folders beginning with /javascript.
To fix this, you will need to perform the following:
You may choose to rename or change the entry in point #2 above depending on whether you are sharing a javascript library across your whole Apache2 setup. Let me know if this worked for you.
I have been fortunate in working a lot more with Kubernetes lately over the last few months so I've been…
Building my portfolio site, I thought I'd show you how I set up my Wordpress development using Docker. Given the…
Frustrated with getting blank images in Puppeteer Chrome screenshots, recently I was in a situation where I needed to migrate…
It has been six year since my last major revamp/redesign of my current petertran.com.au portfolio site. So what are my…
This article helps to solve a Bad owner or permissions on .ssh/config issue occurring on a Windows 10 machine when…
Only a few lines of code required is to implement a payment system, thanks to inline Pin Payments integration. Accepting…
View Comments
Also for Ubuntu 14.04Lts the file you need to change as above is now /etc/apache2/conf-enabled/javascript-common.conf
I commented out that one line, restarted Apache and BAM reversed stupid magic.
Anyone have any clue what causes this garbage to happen? I had a site working 100% perfectly fine on my test server running Ubuntu 14.04, the computer magically restarted itself as I walked up to it after getting something to eat. When it started back up my javascript files were all magically 404 It makes me want to punch the monitor when this idiot shit happens. I am wondering if there was some sort of update while I walked away.
This makes no sense.
THANKS A TON.
Can't believe these defaults. It was impossible to debug.
That worked for me. Thanks. I thought it was something with mime types and JS, so was fixating the search on JS. Thanks for the redirect.
Thans a lot man!
This was insane! Oo
I spent whole evening fighting with this. Thanks! :-)
Thanks - that would've been a tough one to figure out without this! I probably would've just ended up renaming the folder to 'js' or something :P Glad I didn't have to resort to that.
That was a saviour stuff - such a freaky error!
Thanks, that saved me. Weird that it worked for me before, but stopped when I installed php.
you saved my life. my eyes were about to pop out of my head