You are not logged in.

#1 2008-12-25 07:42:30

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Apache not listing all directories

Hi,

I am trying to transfer my LAMP application from Ubuntu to ArchLinux. Everything is fine in Ubuntu, but when I look at my page in Arch, some of the functions are missing. I installed firebug, and realized that users' pictures cannot be found, since they were in user_pic directory. I tried to look at the directory listing of my public html directory and realized that some of the directories are missing. I set the permission to 777 and 644 for all directories, but still unable to see them.

At first, I thought user_pic directory is missing, because of the "_" in it, but I found another directory containing "_". Also, I observed that some directories that don't have "_" in their names are missing as well. Any idea how I can get rid of this problem?

Edit: I just copied the entire directory content to /srv/http/ and was able to see everything correctly. Any idea why it doesn't work in my home directory at http://localhost/~myname/ ?
Thanks

Last edited by mohtasham1983 (2008-12-25 07:45:32)

Offline

#2 2008-12-25 14:28:48

dav7
Member
From: Australia
Registered: 2008-02-08
Posts: 674

Re: Apache not listing all directories

I don't think Arch configures its httpd to list user directories by default.


Windows was made for looking at success from a distance through a wall of oversimplicity. Linux removes the wall, so you can just walk up to success and make it your own.
--
Reinventing the wheel is fun. You get to redefine pi.

Offline

#3 2008-12-25 14:43:43

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Re: Apache not listing all directories

dav7 wrote:

I don't think Arch configures its httpd to list user directories by default.

It doesn't list if there is index.html in the directory. I don't have index.html, so it shows all files. I added index.php to the confi file, so that when apache sees it, doesn't list the directories. But this is not my concern. My main problem is that apache cannot see some of the directories in user home directories at all. It's very strange.

Also, I don't know why in Arch they have set the default debug mode of apache to false, so that people can't see error messages. My php file has several syntax errors, but I can't see the error message on the browser. I tried php -l to see the error, but it just says cannot parse the document without indicating the actual error and when it occurs. Still looking for enabling error messages in apache.

Offline

#4 2008-12-27 09:18:42

mohtasham1983
Member
Registered: 2008-12-15
Posts: 85

Re: Apache not listing all directories

Basically I override the default policies in users' home directories to the same thins in /srv/http/. Now the content of  /etc/httpd/conf/extra/httpd-userdir.conf looks like this:

<Directory "/home/*/public_html">
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

Offline

Board footer

Powered by FluxBB