Solved

Apache Won't display a subfolder

Posted on 2013-12-26
5
398 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 82

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 82

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Join & Write a Comment

Suggested Solutions

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

758 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now