I have a apache machine which is serving a .js file. That file should be the only file that need to seen.
Edit:
I have configured to do so in my apache like this :
<VirtualHost *:7090>
ServerAdmin localhost@test.in
DirectoryIndex test.js
DocumentRoot /var/www/test
ServerName test.in
</VirtualHost>
<Location /var/www/test/test.js>
Order allow,deny
Allow from all
</Location>
The site address is test.in which points to test.js file in /var/www/test directory. That is working fine. But I wish when the user tries to hit test.in/someurl (which is not available) or some other url than test.in need to give an message with 401 error.
How do I do that?
virtualhostwith the attributeDocumentRootwhich is pointing to that file. – sriram Dec 11 '12 at 11:29DocumentRootcan point to a directory. Not to a file... – Nils Dec 11 '12 at 22:11/to thetest.jsresource transparently for the user/client. In that case we can use anAliasdirective or aRewriteRule. – gertvdijk Dec 12 '12 at 1:01