I am working on a project where http://www.mywebsite.com/index.html
is in /var/www/public
, which is the document root (according to /etc/apache2/sites-available/000-default.conf
). I have javascript files in /var/www/js
that I would like to reference in my /var/www/public/index.html
file. Here is what I've tried so far
<script src="/js/js_file.js"></script>
-
<script src="js/js_file.js"></script>
-
<script src="../js/js_file.js"></script>
-
<script src="../../js/js_file.js"></script>
None of these work.
How do I reference javascript files outside of the document root directory?