Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Apache Error 403 - CentOS with Apache 2.2.3

Posted on 2009-04-07
15
Medium Priority
?
1,901 Views
Last Modified: 2012-05-07
I am installing Big Brother on a CentOS 5.2 running the default Apache 2.2.3.

When I try to access any web page I get the following error:
Forbidden

You don't have permission to access /bb/ on this server.
Apache/2.2.3 (CentOS) Server at fmsubbnix Port 80

So far I have:
1) Set the Directory options to FollowSymLinks
2) Verified all directory and file permissions are at 755
3) Set permissions temporarily to 777 and received same error so I am assumiong the issue is in a config file somewhere
4) in hhtpd.conf verified <Files ~ "^\.ht">  is correct
5) verified the "default" directory is correct (/var/www/html)

I have read and tried serveral options in posts listed here but to no avail and am at a loss as to what to look for next.
0
Comment
Question by:gordonmann
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 5
15 Comments
 
LVL 1

Author Comment

by:gordonmann
ID: 24088922
I can now browse to the default apache page but still get the errors on the bb page
0
 
LVL 27

Expert Comment

by:caterham_www
ID: 24089069
Did you check the error_log? It should show you if the 403 is caused due to some configuration (may be DirectoryIndex) or file system issue.
0
 
LVL 1

Author Comment

by:gordonmann
ID: 24089110
I will look.  If I copy my file form the usr/path to  /var/www/html  I can the page less any graphics
0
Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

 
LVL 1

Author Comment

by:gordonmann
ID: 24089213
Found an error; Symbolic link not allowed or link target not accessible: /var/www/html/bb, referer: http://fmsubbnix//bb.html

The actual files are located at /usr/home/bbnix/bb4.10-bbpe/www

So this tells me I have a Symbolic Link issue and I am not that great on this topic.
0
 
LVL 80

Expert Comment

by:arnold
ID: 24090265
Create a virutal path
<directory /bb>
serverpath  /usr/home/bbnix/bb4.10-bbpe/www/
</directory>

I think this is the right approach, but the syntax might be wrong.
0
 
LVL 80

Expert Comment

by:arnold
ID: 24090296
Sorry wrong thing:

use alias
Alias /bb /usr/home/bbnix/bb4.10-bbpe/www/
0
 
LVL 1

Author Comment

by:gordonmann
ID: 24090615
Tried the alias suggestion and received this error:  bash: alias: /bb: not found
                                                                             bash: alias: /usr/home/bbnix/bb4.10-bbpe/www: not found
0
 
LVL 1

Author Comment

by:gordonmann
ID: 24091205
I have been able to find a work around by moving all the file in /home/bbnix/www TO a bb directory in the root html directory.  Although this will work for my needs I really would like a resolve to why the symbolic links did not work.
0
 
LVL 80

Expert Comment

by:arnold
ID: 24092203
I think you are trying to add the alias directive in the wrong place.  The alias directive needs to be added in an httpd.conf or a

I.e. create a file in /etc/httpd/conf.d/bb.conf
In this file, bb.conf add the alias directive.
0
 
LVL 1

Author Comment

by:gordonmann
ID: 24092236
Okay now you have me really confused.  I tried to add to httpd.conf and received an error message on restart of hhtpd service.  If I make a new file as you state please explain how this will be read byt the service.

I am not that good on Linux or Apache that i understand the flow of the software's logic
0
 
LVL 80

Expert Comment

by:arnold
ID: 24092274
On centos, httpd.conf I believe has an include directive to include additional configuration settings from the /etc/httpd/conf.d/*.conf
see if your /etc/httpd/conf/httpd.conf has:

Include conf.d/*.conf
0
 
LVL 1

Author Comment

by:gordonmann
ID: 24096781
I found the section and syntax of the Alias directive in the httpd.conf and inserted an alias there for bb and still receive the 403 Forbidden Error.
0
 
LVL 80

Accepted Solution

by:
arnold earned 2000 total points
ID: 24096867
The problem now is likely the permissions along the route.
Presumably your HTTPD runs as apache
while as root do su - apache

First you should make sure that appache can cd into the

Make sure that the path to /usr/home/bbnix/bb4.10-bbpe/
Has the permissions of at least 711 on
/usr/home
/usr/home/bbnix
/usr/home/bbnix/bb4.10-bbpe
The permissions on the www in this path must be 755 if you want directory index to work.
The included directories and files need to have 755 and 644 respectively or reflect apache as the owner.
0
 
LVL 1

Author Comment

by:gordonmann
ID: 24097185
BINGO!!!        I forgot to change the permissions on /home/bbnix/
0
 
LVL 1

Author Closing Comment

by:gordonmann
ID: 31623685
Thanks Arnold
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month10 days, 23 hours left to enroll

618 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