Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This is probably a very basic problem, but I am still at a basic skill level. I have started practicing with Javascript and Ajax recently. I use Ubuntu on a Virtual Box virtual computer. I have a LAMP installed on Ubuntu. I use Firefox. I have been following the Ajax For Dummies frameworks and examples. I have done some simple Javascript text-display scripts and they work fine. However, when I tried an Ajax script (attempting to get data from a text file on the local host) it does not work. The text does not appear in the browser with either "onclick" or "onload". I downloaded and tested the example Ajax for Dummies script (ch03/index.html) and that also did not work. Any answers or advice would be more appreciated than you will probably ever know. Cheers guys, Andrew

share|improve this question
up vote 1 down vote accepted

Be sure to place all data you are trying to access somewhere within /var/www on your server's filesystem, as /var/www is the default root directory for the webserver.

share|improve this answer
Cheers guys, they have always been in either /var/www and /var/www/Development. I will keep working on it. – Andrew Apr 11 '12 at 13:34
Could it be a permissions issue? – hexafraction Apr 11 '12 at 19:08
@aking1012's answer is much better, why did you accept mine? – hexafraction May 21 '12 at 20:39

I strongly suspect you're trying to access something outside of /var/www. This permission problem is by design.

If you used ln -s /var/www/Development ~/Development apache by default won't follow that link.

share|improve this answer

Re the above permission suggestions, I am trying the scripts with a WAMP server now. The Dummies scripts are now working, but my own scripts are still not. I will continue to keep at it. Andrew

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.