ubuntu - Apache returning 404 for requests inside /javascript directory -


i have project several sub-directories. works fine, except if try access files inside /root/javascript directory, 404. files in fact exist, , in fact typing path correctly. if rename directory can access files. rename back, , 404 again. vhost file works fine. no .htaccess files involved.

apache version: 2.4.9

os: ubuntu 13.10

after searching , trying different things, here's problem came down to:

by default, apache 2.4 on ubuntu enables config file called javascript-common, redirects requests files inside /javascript (that is, directory @ root of project called 'javascript') /usr/share/javascript.

solution 1

use following command disable javascript-common configuration file:

a2disconfig javascript-common 

solution 2

add javascript files inside /usr/share/javascript directory. way apache find files , no 404 returned. 1 benefit of doing things way won't need multiple copies of same files (jquery.js, etc.js) multiple projects use...

solution 3

delete directory /usr/share/javascript, , create symbolic link points project's /javascript directory. keep in mind if have more 1 project (vhost file), serve same javascript file original project. in other words, not best solution...


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -