LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache displays directories but not files (https://www.linuxquestions.org/questions/linux-server-73/apache-displays-directories-but-not-files-588802/)

gungarlin 10-02-2007 02:51 AM

Apache displays directories but not files
 
Hi. Hoping someone can help.

I am running red hat 4 and apache 2.
I have set up apache webserver to serve my redhat distribution. My problem is when i browse to the document root "var/www/html" I can see the Rhinstalltree folder and any folders below it. But I do not see any files. I am using a pretty much default install with auto_indexing module loaded but i think something might be wrong in my httpd.conf file in the options directive:

DocumentRoot "/var/www/html/"
<Directory />
Options Indexes FollowSymLinks
AllowOverride None
</Directory>

<Directory "/var/www/html/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>

Any help will be greatly appreciated,,,

Gungarlin...

tp11235 10-29-2007 11:23 AM

I suspect that it does not like the / at the end of your document path.

If that does not help, let me see more of the httpd.conf file and we can see if there is some other problem.

this213 10-29-2007 02:23 PM

Quote:

Originally Posted by gungarlin
My problem is when i browse to the document root "var/www/html"

What do you mean when you browse there? Shouldn't you be browsing to http://localhost instead?

If you just mistyped something, and you are indeed trying to hit that server by a valid IP or domain name, make sure you have your default file listed in your DirectoryIndex option in your httpd.conf. It should read something like:
Code:

DirectoryIndex index.php index.cgi index.shtml index.html index.htm index.html.var
remove the ones you don't use from that, I just put them all in there as an example.

There's nothing wrong with a trailing slash

gungarlin 10-29-2007 11:37 PM

Thanks to those who took time to respond to my question.
I was able to resolve the problem by creating a new folder and copying the contents of Rhinstalltree to the new folder. Then deleting the 'Rhinstalltree' folder and renaming the new folder to Rhinstalltree. Everything works fine now. Thanks once again.....


All times are GMT -5. The time now is 07:16 AM.