LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 12-30-2004, 08:21 AM   #1
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Rep: Reputation: 0
Apache 403 error with Mandrake 10.1


I have recently installed Mandrake 10.1 on one of my computers and have been
generally happy about it and am in the process of learning everything I can
about it.

However, it's intended primary function as a development machine is currently
having problems. I set it up so that it installed apache 2.x with the install
of Mandrake and I checked the localhost to make sure it brought up the test
page which it did just fine ("Your apache machine is set up blah, blah, blah").
However, I cannot get it to read out of the /var/www/html directory to save my
life.

I would LIKE it to read out of /home/moo/MyDocs/VoD/ but I have only gotten 403
errors if I move the DocumentRoot path out of /var/www/html. I have changed
the whole home directory to moo:moo and 755 without any success. I've
restarted the server a bazillion times, and have searched forums and google and
tried pretty much everything under the sun I've seen, but I cannot get it to
read correctly. Tried running it on http://localhost:8080/ with no results as well as
defining a file to read, with the same old 403.

So finally I come to you asking help, probably a last resort before I end up
attempting an uninstall of Apache and manual install. I would like to avoid
this as much as possible since it's already got PHP installed on it and
everything so any help is greatly appreciated!

Here is my httpd2.conf file:

### Main Configuration Section
### You really shouldn't change these settings unless you're a guru
###
ServerRoot /etc/httpd/2.0
#ServerName localhost
#LockFile /etc/httpd/httpd.lock
PidFile /var/run/httpd.pid
ErrorLog logs/error_log
LogLevel warn
DocumentRoot /home/moo/MyDocs/VoD/testing


### Dynamic Shared Object (DSO) Support
###
### You should always leave those three, as they are needed for
### normal use.
### mod_access (Order, Allow, etc..)
### mod_log_config (Transferlog, etc..)
### mod_mime (AddType, etc...)

LoadModule access_module modules/mod_access.so
LoadModule auth_module modules/mod_auth.so
LoadModule auth_anon_module modules/mod_auth_anon.so
##LoadModule auth_dbm_module modules/mod_auth_dbm.so
LoadModule auth_digest_module modules/mod_auth_digest.so
##LoadModule charset_lite_module modules/mod_charset_lite.so
##LoadModule case_filter_module modules/mod_case_filter.so
##LoadModule case_filter_in_module modules/mod_case_filter_in.so
##LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule include_module modules/mod_include.so
LoadModule log_config_module modules/mod_log_config.so
##LoadModule log_forensic_module /usr/lib/apache2/mod_log_forensic.so
LoadModule logio_module modules/mod_logio.so
LoadModule env_module modules/mod_env.so
##LoadModule mime_magic_module modules/mod_mime_magic.so
##LoadModule cern_meta_module modules/mod_cern_meta.so
LoadModule expires_module modules/mod_expires.so
LoadModule headers_module modules/mod_headers.so
LoadModule usertrack_module modules/mod_usertrack.so
##LoadModule unique_id_module modules/mod_unique_id.so
LoadModule setenvif_module modules/mod_setenvif.so
LoadModule mime_module modules/mod_mime.so
LoadModule status_module modules/mod_status.so
LoadModule autoindex_module modules/mod_autoindex.so
LoadModule asis_module modules/mod_asis.so
LoadModule info_module modules/mod_info.so
LoadModule cgi_module modules/mod_cgi.so
##LoadModule cgid_module modules/mod_cgid.so
LoadModule vhost_alias_module modules/mod_vhost_alias.so
LoadModule negotiation_module modules/mod_negotiation.so
LoadModule dir_module modules/mod_dir.so
LoadModule imap_module modules/mod_imap.so
LoadModule actions_module modules/mod_actions.so
##LoadModule speling_module modules/mod_speling.so
LoadModule userdir_module modules/mod_userdir.so
LoadModule alias_module modules/mod_alias.so
LoadModule rewrite_module modules/mod_rewrite.so

###
### Global Configuration
###
# We now support multiple apache configurations on the same server. In
# common.conf, we put all directives that are common to all implementations
# (httpd, httpd-perl, etc.)
# For Apache2 we load all conf files in conf.d
Include /etc/httpd/conf.d/*.conf
Include conf/commonhttpd.conf


###
### IP Address/Port and Proxied configuration section
###
# The APACHEPROXIED setting can be set in /etc/rc.d/init.d/httpd if you
# are using a proxy or accelerator, like the Apache-SGI or khttpd, so that
# the fast web server serves static content while Apache handles the
# cgi or php files

#BindAddress *
<IfDefine APACHEPROXIED>
Listen 8080
</IfDefine>
<IfDefine !APACHEPROXIED>
Listen 80
</IfDefine>

# Likewise, we can set apache as the server by default and send perl
# requests via ProxyPass to apache-mod_perl. It increases performance
# since the perl interpreter is only used for perl and the standard apache
# does all the html and image files, with a smaller footprint.
#
# If you install apache and apache-mod_perl, this is the default config.
# If you don't want two web servers to use perl, uninstall apache, and
# apache-mod_perl will not be proxied.

<IfDefine PERLPROXIED>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^proxy:.* - [F]
RewriteRule ^(.*\/perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
RewriteRule ^(.*\/cgi-perl\/.*)$ http://%{HTTP_HOST}:8200$1 [P]
</IfModule>
</IfDefine>

###
### Log configuration Section
###

<IfModule mod_log_config.c>
#Single logfile with access, agent and referer information
#This is the default, if vlogs are not defined for the main server
CustomLog logs/access_log combined env=!VLOG
#If VLOG is defined in conf/vhosts/Vhost.conf, we use this entry
CustomLog "|/usr/sbin/advxsplitlogfile" vhost env=VLOG
</IfModule>

###
### Virtual Hosts
###
# We include different templates for Virtual Hosting. Have a look in the
# vhosts directory and modify to suit your needs.
Include conf/vhosts/Vhosts.conf
#Include conf/vhosts/DynamicVhosts.conf
#Include conf/vhosts/VirtualHomePages.conf


###
### Performance settings Section
###
#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 15


# prefork MPM [THIS IS THE DEFAULT]
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule prefork.c>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClients 150
MaxRequestsPerChild 0
</IfModule>

# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>

# perchild MPM
# NumServers: constant number of server processes
# StartThreads: initial number of worker threads in each server process
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# MaxThreadsPerChild: maximum number of worker threads in each server process
# MaxRequestsPerChild: maximum number of connections per server process
<IfModule perchild.c>
NumServers 5
StartThreads 5
MinSpareThreads 5
MaxSpareThreads 10
MaxThreadsPerChild 20
MaxRequestsPerChild 0
</IfModule>

###
### webapps configuration section
###

# Web applications should be activated _after_ apache has been
# configured properly.
Include /etc/httpd/webapps.d/*.conf
 
Old 12-30-2004, 08:54 AM   #2
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Original Poster
Rep: Reputation: 0
I was told recently by a friend to try running the apache service as something other than root (which is presumably the default?). How would I go about running the service as my main user account?
 
Old 12-30-2004, 10:51 AM   #3
unangst
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake 10.1
Posts: 7

Rep: Reputation: 0
There appears to be some sort of conflict going on between Mandrake's Apache-AdvancedExtranetServer and Webmin's configuration of Apache files. I'm running into the same issues today.

It doesn't matter how I setup the virtual hosts in Webmin's Apache module... I can never get anything (beyond or different than) var/www as the default and only directory.

Help! Let's work on this one together!

Is there a way to disable Apache-AdvancedExtranetServer so that I can just use plain old Apache2. Apache-AdvancedExtranetServer does not seem all that current anymore... their site hasn't been updated in 1 1/2 years. Other than that, my Mandrake box and Webmin are wonderful!
 
Old 12-30-2004, 11:23 AM   #4
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Here is my exact error when I try to get to the page:

Forbidden

You don't have permission to access /VoD/testing/index.php on this server.
Apache-AdvancedExtranetServer/2.0.50 (Mandrakelinux/7mdk) mod_perl/1.99_16 Perl/v5.8.5 mod_ssl/2.0.50 OpenSSL/0.9.7d PHP/4.3.8 Server at 127.0.0.1 Port 80
 
Old 12-30-2004, 11:42 AM   #5
unangst
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake 10.1
Posts: 7

Rep: Reputation: 0
Does it work in the original location? If so, why do you need to move the location? I too had trouble mapping to another folder... until I gave up and went with the flow.

My user is my username and my group is root .

Quote:
How would I go about running the service as my main user account?
Answer:http://www.hk8.org/old_web/linux/run/ch04_14.htm

Strike the comments about Webmin, I don't think that you're using that....
However, I would strongly advise that you look into Webmin (free) as a Linux control panel for the non-propeller head user (like you and I).

Anyways, my issue is a little bit different, I'm trying to see if AdvancedExtranetServer interferes with Webmin. Any thoughts on this one?

Thanks!
 
Old 12-30-2004, 11:56 AM   #6
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Original Poster
Rep: Reputation: 0
I'd like to move the documentroot and not "go with the flow" because my hard drive is partioned so that more than 90% of my space is on the /home directory and I don't want to clutter up the rest of the hard drive with regular user stuff.
 
Old 12-30-2004, 11:58 AM   #7
unangst
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake 10.1
Posts: 7

Rep: Reputation: 0
That makes sense to me.

Good luck with trying to change the user permissions.
Linux sure doesn't make that easy for us, does it?
 
Old 12-30-2004, 12:10 PM   #8
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Original Poster
Rep: Reputation: 0
My permissions for /etc/httpd/conf/ are

etc - root
httpd - me
conf - me

and the /var/www/html are

var - root
www - apache
html - apache

and finally the document root folder I'm trying to get into /home/me/MyDocs/VoD are:

home - root
me - me
MyDocs - me
VoD - me

P.S>

I've also tried this now:

home - root
me - apache
MyDocs - apache
VoD - apache

Which also doesn't work

and all the files below it (VoD) are also me. Can anyone see anything wrong with this? THe /var/www/html directory works fine...but that's it

Last edited by MooCows; 12-30-2004 at 01:18 PM.
 
Old 01-03-2005, 02:08 PM   #9
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Original Poster
Rep: Reputation: 0
*bump*
 
Old 01-04-2005, 07:14 AM   #10
MooCows
LQ Newbie
 
Registered: Dec 2004
Posts: 12

Original Poster
Rep: Reputation: 0
I just noticed my conf file has no:

<Directory directory-path>

or

<Location URL-path|URL>

I also can't seem to find a htaccess file, could any of these reasons be why I get the error?
 
Old 01-04-2005, 10:25 AM   #11
unangst
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake 10.1
Posts: 7

Rep: Reputation: 0
Does this help?

Found this posted today to a mailing list I subscibe to.

Does it help?

> For some reason I am not able to get Apache to display the public_html
> contents of a users home directory to work. I keep getting a 403
> error Forbidden.

That's the default behaviour in the Apache 2 version, I think.

> <IfModule mod_userdir.c>
> #
> # UserDir is disabled by default since it can confirm the presence
> # of a username on the system (depending on home directory
> # permissions).
> #
> # UserDir disable

Uncomment the previous line too. It must be:

UserDir enable

> As a last resort I've made the permissions for the /home/jack
> directory
> 777

No, you are creating a severe security problem. Everybody will have permision to write on that home directory.

Put it 701.

> Also the /home is set for 777

No, it's not necesary.

...Give this a shot... (unangst)
 
Old 01-16-2005, 03:27 PM   #12
PsychosisNode
Member
 
Registered: Apr 2003
Location: Reading, Berkshire, IN-GER-LUND!!!
Distribution: Mandriva 2006
Posts: 228

Rep: Reputation: 30
403s all round!

I too am trying to get Apache to give me access to http://localhost/~username/ but to no avail. I've gone through the configuration files and checked file permissions - public_html and everything under is owned by my regular user and chmodded to 755. I just can't find what's causing the problem. Before I used to have a symlink in /var/www/html to the directory I keep my web pages in, and accessing URLs such as http://localhost/web_dir/web_page.html (where web_dir is the symlinked directory) worked fine, but not so with the ~username/ system. I'm using Mandrake 10.1.

I get this error in my browser:

You don't have permission to access /~taiyo/ on this server.

Additionally, a 403 Forbidden error was encountered while trying to use an ErrorDocument to handle the request.

Yelp!
 
Old 01-18-2005, 08:51 AM   #13
unangst
LQ Newbie
 
Registered: Aug 2003
Distribution: Mandrake 10.1
Posts: 7

Rep: Reputation: 0
More thoughts

This goes back to my first posting in this column:

Quote:
There appears to be some sort of conflict going on between Mandrake's Apache-AdvancedExtranetServer and Webmin's configuration of Apache files. I'm running into the same issues today.
Any help on the www.apache.org site? I started to look, but ran out of time.

BTW, Check out www.webmin.com for all of your "linux admin needs." Two thumbs up!
 
Old 02-09-2005, 05:34 PM   #14
gilamnstr
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
I commented out the following lines in commonhttpd.conf to at least get it working for now...

#Restricted set of options
#<Directory />
# Options -All -Multiviews
# AllowOverride None
# <IfModule mod_access.c>
# Order deny,allow
# Deny from all
## </IfModule>
#</Directory>

not so secure but at least I can serve from directories outside of /var/www/html
 
Old 02-10-2005, 05:02 AM   #15
shazam75
Member
 
Registered: Oct 2004
Location: Australia, Brisbane
Distribution: Gentoo
Posts: 296

Rep: Reputation: 30
I think you should have something like this

#Restricted set of options
<Directory /home/yourhome/*>
Options -All -Multiviews
AllowOverride None
<IfModule mod_access.c>
Order allow,deny
Allow from all
</IfModule>
</Directory>

Regards
Shelton.

Last edited by shazam75; 02-10-2005 at 05:10 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache and cgi 403 Error. tethysgods Linux - Software 2 08-30-2004 09:06 AM
Apache 403 Error?? jlsain Linux - Software 4 05-08-2004 03:45 PM
Apache 403 error with Mandrake 9.0 Skywolf Linux - Newbie 11 07-15-2003 07:46 AM
apache 403 error fix cortj Linux - Software 0 02-25-2003 03:27 PM
apache 403 error forbidden? bulliver Linux - General 4 01-31-2003 07:47 AM


All times are GMT -5. The time now is 12:55 AM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration