Apache 2.2 problem


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Apache 2.2 problem
# 1  
Old 12-20-2007
Apache 2.2 problem

Hi all,
I'm a user of Debian 4.0. I installed apache 2.2 and add the functionality to support ~/public_html for each user. This is the permission of my public_html:
drwxr-xr-x 4 mj test 4096 2007-12-20 20:17 public_html
When I wanted to go through it and list the directory via my browser, it told me:
Access forbidden!

You don't have permission to access the requested directory. There is either no index document or the directory is read-protected.

If you think this is a server error, please contact the webmaster.
Error 403
But when I put index.htm in the public_html the browser can load it.
Where is the problem?
# 2  
Old 12-20-2007
That seems to suggest directory listing is prohibited. For security reason, this is typically the default.

core - Apache HTTP Server

Look at the "Indexes" option.
# 3  
Old 12-21-2007
I put this in /etc/apache2/mods-enabled and restarted the apache server.
lrwxrwxrwx 1 root root 32 2007-12-21 10:46 autoindex.load -> ../mods-available/autoindex.load
But nothing changed!
# 4  
Old 12-21-2007
IIRC you need to add the Indexes option to the <Directory *> part of http.conf (or the conf file for your server - on Debian it may be under sites-{available|enabled}.

also, (I'm nowhere near a Debian system at the momen, so this may be wrong) I think the symlink you created has to start with a number, so try making it:

01-autoindex.load -> ../mods-available/autoindex.load
# 5  
Old 12-21-2007
My problem was in file /etc/apache2/mods-available/userdir.conf
I put <Directory /home/*/*/public_html> from my previous server. And now I replaced it with <Directory /home/*/public_html> and every things becomes OK.

Thanx to all.Smilie
# 6  
Old 12-21-2007
I've faced another problem with my Apache server.

I installed php5 php5-common php5-cli libapache2-mods-php.
After restarting apache, I couldn't run any php on my server. (even phpinfo())
It showed me:
Server error!

The server encountered an internal error and was unable to complete your request.

Error message:
Premature end of script headers: test.php

If you think this is a server error, please contact the webmaster.
Error 500
# 7  
Old 12-21-2007
Go to php.ini and check the configuration that writes error log. If it points to a file, go to the file and see if PHP leaves any error there.

The symptom suggests even PHP cannot start at all. Also look in the Apache error log file for hints. By the way, I am also running Debian + PHP5 on my desktop and it works fine.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Problem Installing Apache from rpm

I am attempting to install an rpm of Apache from perzl.org on an AIX 6100-07-03-1207 server and it is failing. I think I have all of the dependencies installed. Can anyone help? Any help would be appreciated. It fails with the following error: # rpm -Uvh httpd-2.4.2-2.aix5.1.ppc.rpm ... (3 Replies)
Discussion started by: lbholde
3 Replies

2. IP Networking

dns problem in apache

Hi, I am running scientific linux (which is clone of red hat linux) on virtual machine that is virtual box. I tried to start the apache but I got the following message. starting httpd: httpd: arp_sockaddr_info_get() failed for scientific-linux httpd: could not reliably determine the... (2 Replies)
Discussion started by: programAngel
2 Replies

3. UNIX for Dummies Questions & Answers

Problem with Restricting Directory in Apache

Hello, I want to restrict access to our Subversion repositories to only our internal network. I have a virtual host directive setup in Apache for the IP and port 443. When I put the following: <Directory "/var/www/svn/"> Order allow,deny AllowOverride None Allow from 10.5.10.0/24 Allow... (1 Reply)
Discussion started by: mojoman
1 Replies

4. Solaris

problem compiling apache on solaris

Hi I'm trying to install apache 2.2.14 on Solaris with Openssl. I'm using following configure options: ./configure --prefix=/usr/local/apache2 --enable-ssl --enable-module=so --enable-proxy=shared --enable-proxy-http=shared --enable-proxy-ajp=shared --with-ssl=/usr/local/openssl ... (3 Replies)
Discussion started by: Aelfric
3 Replies

5. Web Development

Problem setting up apache

Hello there, I installed Ajaxterm on my Ubuntu 9.04 machine, and it's running ok if I use : http://localhost:8022/ in my browser. The problem is that I wanted to be able to acces it from somewere else through the internet. I read some instruction and help sites related to this problem, like :... (2 Replies)
Discussion started by: spiriad
2 Replies

6. UNIX and Linux Applications

Apache problem: mod_deflate with mod_proxy

I am using Apache 2.2.3 on RHEL5 and having problems to get mod_deflate work with mod_proxy. mod_deflate will compress files by mime-type just fine as long as those files are served statically from the local server. However, files served via dynamic php application (ie, MediaWiki) or via... (2 Replies)
Discussion started by: otheus
2 Replies

7. Debian

apache problem

hi all, I can't get my index.html to display on the web browser. Please point it out the reason. this is what i had done so far: 1. I have registered a dns name pointing to my public ip (it is done automatic) 2. my server name is set same as the dns name 3. I have configured... (14 Replies)
Discussion started by: k2k
14 Replies

8. Red Hat

Problem in apache

Can anyone guide, what should be the entry in httpd.conf file to host a site in Redhat Ent Linux 5 without using nameserver? Or process to set apache server in same dist of Linux. Any link to understand apache well will be much appreciable. (3 Replies)
Discussion started by: naw_deepak
3 Replies

9. Solaris

Apache start problem

Hi, I have installed apache webserver on my solaris 10(x86). When I tried to start the server it gives following error, ld.so.1: /usr/local/apache2/bin/httpd: fatal: libssl.so.0.9.8: open failed: No such file or directory Killedld.so.1:: Too many arguments Can somebody please guide me how... (1 Reply)
Discussion started by: maheshsri
1 Replies

10. Solaris

Apache with SSL problem

Hi All, I'm attempting to build Apache 1.3.27 on a new Solaris 9 system. I am using following "Option 2" in the INSTALL of the mod_ssl-2.8.12-1.3.27, and I'm stumped. After I configure and make all the required components the make of the Apache server itself stops at: flex... (2 Replies)
Discussion started by: b_manu78
2 Replies
Login or Register to Ask a Question