404 not found for HTML file in workspace subdirectory




If I put my HTML file in the root of my workspace directory, it can be accessed when clicking ‘Run’. But if the file is in a subdirectory I created within the workspace, clicking ‘Run’ generates a 404 ‘Not Found’ error from Apache.

The URL is in the format: https://MyUserName.c9users.io/javascript/FCC-266.html

If I truncate the filename so its just the Apache URL with the subdirectory, then Apache displays ‘Access Forbidden’. If I right click the file in the subdirectory from the IDE and select Preview, then its viewable but its not shown as the full URL but as ‘/subdirectory/file.html’

The subdirectory has the permissions: drwxr-xr-x
The files in the subdirectory has the permissions: -rw-r–r--

How do I get Apache to allow a subdirectory and its files?



Thanks for writing in. Can you give us a bit more info?

  • Is the file in question present in /home/ubuntu/workspace/javascript/FCC-266.html ?
  • When you start the apache server normally (for example using the apache runner, or just running apachectl start from the terminal), and visit other pages, does that work? or is that the problem with just this file?
  • What is the actual path to the file, and would it be ok for support to take a look at the workspace?



I created a new blank public workspace, copied the same file over into a subdirectory. Everything works in the new public workspace. So its something up with my old workspace. I’ll just delete and re-create.