LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-24-2003, 12:01 AM   #1
RKris
Member
 
Registered: May 2002
Location: UK
Distribution: Mandriva linux
Posts: 152

Rep: Reputation: 15
Apache forbidden error!!!!!!!!!!!


Hi,

Index.html on domain's documentroot does not execute, it gives me forbidden error.
Rather if I execute it directly, say http://www.domain.com/index.html it works fine.

I have checked the permissions and they are fine.
Can any one provide me any suggestions on how to fix this problem??


regards,
Krishna
 
Old 11-24-2003, 12:51 AM   #2
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
see what it does if you add a / to the address

www.domain.com/
 
Old 11-24-2003, 03:22 AM   #3
RKris
Member
 
Registered: May 2002
Location: UK
Distribution: Mandriva linux
Posts: 152

Original Poster
Rep: Reputation: 15
Hi,
this is my virtualhost directive for the domain

<VirtualHost 2xx.xxx.xxx.xxx:80>
ServerName domain.com
RedirectPermanent / http://www.domain.com/
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>
ServerName www.domain.com
User itgiftp
Group psacln
ServerAdmin "test@domain.com"
DocumentRoot /home/httpd/vhosts/domain.com/httpdocs
CustomLog /home/httpd/vhosts/domain.com/logs/access_log combined
ErrorLog /home/httpd/vhosts/domain.com/logs/error_log

<IfModule mod_jrun.c>
JRunConfig jrun.rootdir "/opt/JRun/bin/./.."
JRunConfig jvmlist itgi
JRunConfig Verbose false
JRunConfig ProxyHost xxx.xxx.xxx.xxx
JRunConfig ProxyPort 15129
JRunConfig Mappings "/opt/jrunservers/itgi/default/local.properties"
</IfModule>

<IfModule mod_userdir.c>
UserDir /home/httpd/vhosts/domain.com/web_users
</IfModule>
<IfModule mod_ssl.c>
SSLEngine off
</IfModule>
<Directory /home/httpd/vhosts/domain.com/httpdocs>
<IfModule mod_php4.c>
php_admin_flag engine off
</IfModule>
Options -Includes -ExecCGI -Indexes
</Directory>
</VirtualHost>

However when I remove my Jrun module settings it works!!! Is there a problem with the JRun?

regards,
Krishna

Last edited by RKris; 11-24-2003 at 03:24 AM.
 
Old 11-24-2003, 03:57 AM   #4
reiss
Member
 
Registered: Nov 2003
Location: Sydney
Distribution: Debian
Posts: 30

Rep: Reputation: 15
When you say you've checked the permissions, are you refering to the file system permissions or apaches permissions. In your httpd.conf there should be a section that looks something like this:

<Directory /var/www/>
#
# This may also be "None", "All", or any combination of "Indexes",
# "Includes", "FollowSymLinks", "ExecCGI", or "MultiViews".
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
Options -Indexes Includes FollowSymLinks MultiViews

#
# This controls which options the .htaccess files in directories can
# override. Can also be "All", or any combination of "Options", "FileInfo",
# "AuthConfig", and "Limit"
#
AllowOverride None

#
# Controls who can get stuff from this server.
#
Order allow,deny
Allow from all
</Directory>

where /var/www/ is the root directory of your web page, the option your looking for is Indexes.
You should have a something like: DirectoryIndex index.html index.htm etc... to indicate the file names that will be recognised as index files.

I a similar problem recently migrating my webserver from linux to openbsd, in that case there where three things preventing me from accessing my pages.

1) in OpenBSD Apache runs chrooted by default, while my pages where kept in tomcats webapps folder, outside of that chroot, meaning they where invisible to apache.

2) Because the file system is organised differently between the two OS's i had initially just left my conf the way it was, and created symlinks to point to the new locations, however while the above config allow following symlinks in root, the higherlevel permission defaults to only allowing symlinks if they are owned by apache. (Which they weren't, still aren't and don't need to be) I just went throught the conf and pointed the directories to their true locations.

3) Still not working properly. I was at this point I discovered that the version of apache that ships with openbsd has most of the core modules statically compiled into it. The linux config had a swathe of loadmodule statements, which had initially prevented the server from starting at all, being that the files where missing, until I commented them out. What I failed to note though was that many of the critical configurations where nested int <IfModule blah.c> type statements, prventing them from being evaluated, since the modules where missing.

I think you can rule out number 1, since you can see the files at all, so my advise would be to check through your httpd.config very carefully if you run httpd -l it will give you a list of complied in modules, make sure you are not trying to load any of these (even if you have the module files), make sure that you have the set the Indexes option in your Document Root and make sure that if they are there, the configs are actually being evaluated, particularly DirectoryIndex, which in my linux config was dependent on mod_dir.c being loaded.

Hmmm, don't know if this is any help, but some things to look for at least, one last thing have a look through your access_log and error_log, you'd be surpised at how much more quickly you can solve stuff like this if you use these.
 
Old 11-24-2003, 04:15 AM   #5
reiss
Member
 
Registered: Nov 2003
Location: Sydney
Distribution: Debian
Posts: 30

Rep: Reputation: 15
Sorry, I didn't mean to be condecending with that error_log comment, it just that I'm still fairly new to this stuff, and only recently been able to look at those things, and not just see a load of meaningless junk

JRun? I've only used tomcat, but I assume that JRun would also use the java security manager, have you tried starting it with security switched off? perhaps you should look at you policy file....
 
Old 11-24-2003, 07:17 AM   #6
DavidPhillips
LQ Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,163

Rep: Reputation: 58
The / may be significant to your problem.

does it work with a / at the end?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error 403 Forbidden access in Apache anoop_cn Linux - Software 1 09-21-2004 09:32 AM
apache error, 403 forbidden afrodocter Linux - Software 6 08-09-2004 08:35 PM
Apache: Forbidden Error Ninja Cow Linux - Software 2 12-07-2003 12:24 PM
Apache 2.0.4 .. FORBIDDEN error CRego3D Linux - Software 6 05-15-2003 10:44 AM
apache 403 error forbidden? bulliver Linux - General 4 01-31-2003 07:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration