Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

403 Forbidden on sub-folders

Status
Not open for further replies.
Apr 27, 2006
126
GB
Hi,

This is going to be a 'stupid' question I'm sure, but I can't seem to get it running after googling for a lengthy time.. so I thought I'd ask for a little help.

I've set up apache on my local machine several times in the past (on both windows and linux) and never encoutnered this problem.

I'll start by saying, I'm 'ok' with linux command line but I'm still learning.

I managed to get apache running on a remote dedicated server. By going to (domain not switched over yet) it takes me to the apache/CentOS test page. "Woo" I thought, so I started copying files over from the old server to the new one (in the /var/ folder)

So now my directory structure looks like:

/var//var//var/
If I try to browse to or I get the 403 forbidden error.

I have read a few fixes, which include various incarnations of editing the <Directory> tag contents, which haven't workd, I also tried setting the DocumentRoot to "/var/ still no joy

I have a feeling that it is file permissions in the folder (maybe caused by the copying from the old server with ftp), if I do an ls -l on the html folder it is owned by root user and root group, apache user and group are set to apache & apache

This is a CentOS server and apache came pre-installed and I've never had to go through this whole process before and am feeling a little lost, below is a snippet of my /etc/httpd/conf/httpd.conf

Any help/advice/pointers will be greatly appreciated by this here noob




Code:
DocumentRoot "/var/[URL unfurl="true"]www/html"[/URL]

#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
    Options FollowSymLinks
    AllowOverride None
</Directory>

#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/var/[URL unfurl="true"]www/html">[/URL]

#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# Note that "MultiViews" must be named *explicitly* --- "Options All"
# doesn't give it to you.
#
# The Options directive is both complicated and important.  Please see
# [URL unfurl="true"]http://httpd.apache.org/docs/2.2/mod/core.html#options[/URL]
# for more information.
#
    Options Indexes FollowSymLinks

#
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be "All", "None", or any combination of the keywords:
#   Options FileInfo AuthConfig Limit
#
    AllowOverride None

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

</Directory>

________
clueless
 
erp.. hopefully fixed it with this, but i am concerned about how much of a security risk it presents
Code:
chown apache /etc/httpd/conf -R 
chgrp apache /etc/httpd/conf -R 

chown apache /var/[URL unfurl="true"]www/html[/URL] -R  
chgrp apache /var/[URL unfurl="true"]www/html[/URL] -R

chmod 755 /var/[URL unfurl="true"]www/html[/URL] -R
chmod 755 /etc/httpd/conf -R
chmod 500 /etc/httpd/conf

________
clueless
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top