Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Apache Won't display a subfolder

Posted on 2013-12-26
5
Medium Priority
?
469 Views
Last Modified: 2014-01-03
There is no .htaccess file in the folder or in any of it's parent folders.    I'm running Apache on a Windows 7 computer.  
I've checked it using google chrome as well.
The directory shows up in internet Explorer but when I see the files listed in the parent directory it doesn't show up.   The permissions are the same as the other folders.  If I add that folder to the url in the address bar I get an error:

Server error!


The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there was an error in a CGI script.

If you think this is a server error, please contact the webmaster.
Error 500
localhost
12/26/13 17:22:10
Apache/2.2.25 (Win32) PHP/5.3.27
0
Comment
Question by:vrosas_03
  • 2
  • 2
5 Comments
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39741028
Windows permissions are only part of what it takes to work in Apache.  Apache will normally only display files that are under the 'web root' also known as the "DocumentRoot".  See here: http://httpd.apache.org/docs/current/mod/core.html#documentroot  More info here: http://httpd.apache.org/docs/current/urlmapping.html#documentroot

Also, from http://httpd.apache.org/docs/2.2/mod/core.html#options

Indexes
    If a URL which maps to a directory is requested, and there is no DirectoryIndex (e.g., index.html) in that directory, then mod_autoindex will return a formatted listing of the directory.
Conversely, if Options -Indexes is in your configuration file, you won't get a file listing and you will get the error because there is nothing that Apache is allowed to display.  You can still get files that you can use the name for like 'about.html' but you don't get the directory listing.

Note also that everything that you can use in '.htaccess' can also be used in 'httpd.conf', the Apache configuration file.
0
 

Accepted Solution

by:
vrosas_03 earned 0 total points
ID: 39742840
I checked again if there was a .htaccess file in the directory itself.   Checking there today I did find a .htaccess file in the invisible directory (invisible in the browser but visible in the file explorer).  I changed the name to xx.htaccess and then the .httaccess file's parent directory showed up in the browser.  
Apparently the .htaccess file can affect the visibility of it's parent directory.  I'm not sure what Command could cause that to happen though.

I'm sure I checked for the .htaccess file in that directory before.  I don't know why I didn't see it.    Maybe it's because it shows up last when you order by filename on windows.  I would have expected it to show up first since it uses a special character first.
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 39742875
Is everything working now?
0
 
LVL 57

Expert Comment

by:giltjr
ID: 39751129
Just as a note,. a '.htaccess' file affects the directory/folder it is in plus all sub directories/folders.
0
 

Author Closing Comment

by:vrosas_03
ID: 39753376
I selected my own comment because I feel I figured it out myself.   It turned out to be the .htaccess file that was making the folder it was inside of invisible from the browser.  I had not seen the .htaccess file the first time I looked.   I didn't expect to see it though since I would expect it to only affect sub folders.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses
Course of the Month8 days, 11 hours left to enroll

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question