LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-27-2005, 12:55 PM   #1
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Rep: Reputation: 34
403 Forbidden


Wow..is this a newbie question.

My websites stoped workign and now displays 403 forbidden. I can assure you the user is azevedo (me) and it's chmoded 755 recursively. It worked like a week ago and stoped. So far none of the threads here have fixed it. I'm about to completely remove apachy and try again.

The roughter is the way it should be.

Here are the configs.
Code:
apache2
...

# Include the virtual host configurations:
#Include /etc/apache2/sites-enabled/[^.#]*  (original setting)
Include /etc/apache2/sites-enabled/000-default (tried this but doesn't work)
Code:
sitesenabled/000-default

NameVirtualHost *
<VirtualHost *>
	ServerAdmin webmaster@localhost
	
	DocumentRoot /files/www/
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /files/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
		# This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # Commented out for Ubuntu
                #RedirectMatch ^/$ /apache2-default/
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
	ServerSignature On

    Alias /doc/ "/usr/share/doc/"

    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    <Directory "/files/www/backup">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0
    </Directory>

</VirtualHost>
Btw I have no idea what /files/www/backup is. It just kindof appeared one day.

Last edited by 1veedo; 11-27-2005 at 01:07 PM.
 
Old 11-27-2005, 01:57 PM   #2
teebones
Member
 
Registered: Aug 2005
Location: /home/teebones
Distribution: sometimes this, sometimes that..
Posts: 500

Rep: Reputation: 56
Re: 403 Forbidden

Quote:
# Include the virtual host configurations:
#Include /etc/apache2/sites-enabled/[^.#]* (original setting)
Include /etc/apache2/sites-enabled/000-default (tried this but doesn't work)
<comment it if it doesn't work!>

Quote:

NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /files/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /files/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
# This directive allows us to have apache2's default start page
# in /apache2-default/, but still have / go to the right place
# Commented out for Ubuntu
#RedirectMatch ^/$ /apache2-default/
</Directory>
ehm.. why are you using 2 directory blocks for the same directory?

better to combine it to something like:

<VirtualHost *>
ServerAdmin webmaster@localhost

DocumentRoot /files/www/
<Directory /files/www>
AllowOverride None
Options Indexes FollowSymLinks MultiViews
Order allow,deny
allow from all
</Directory>

let's continue:

Quote:
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
thus all PERL/CGI scripts reside in /usr/lib/cgi-bin (this should have the right permissions to work! did you check this?

Quote:
ErrorLog /var/log/apache2/error.log

# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn

CustomLog /var/log/apache2/access.log combined
ServerSignature On
Quote:
Alias /doc/ "/usr/share/doc/"

<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
remove things you don't use!

Quote:

<Directory "/files/www/backup">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0
</Directory>

</VirtualHost>
Btw I have no idea what /files/www/backup is. It just kindof appeared one day.
Things cannot just appear out of the blue in a config file. (this must be done by hand, or by tool you triggered yourself (or via cron))
But then again.. remove what you don't need!

Last edited by teebones; 11-27-2005 at 01:59 PM.
 
Old 11-27-2005, 05:46 PM   #3
1veedo
Member
 
Registered: Dec 2004
Location: WV, USA
Distribution: Gentoo, Debian
Posts: 186

Original Poster
Rep: Reputation: 34
No joke it did appear out of noware. One day the entire folder just appeared! I just left it alone and didn't think much about it. It is kind of wierd though. I never added /files/www/backup.

edit...
I completely reinstalled apache and this is the file. The only thing I've done is change /var/www to /files/www and the email. This means it has nothing to do with the file but with something else. The file I posted above is just like the original so it actually never did have anything to do with file.
Code:
NameVirtualHost *
<VirtualHost *>
	ServerAdmin 1veedo@yahoo.com
	
	DocumentRoot /files/www/
	<Directory />
		Options FollowSymLinks
		AllowOverride None
	</Directory>
	<Directory /files/www/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
		# This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                # Commented out for Ubuntu
                #RedirectMatch ^/$ /apache2-default/
	</Directory>

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	<Directory "/usr/lib/cgi-bin">
		AllowOverride None
		Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	</Directory>

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined
	ServerSignature On

    Alias /doc/ "/usr/share/doc/"
    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

</VirtualHost>

Last edited by 1veedo; 11-27-2005 at 09:52 PM.
 
  


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
apache 403 forbidden? wezhousheng Linux - Networking 5 05-13-2005 12:15 AM
403 Forbidden patpawlowski Linux - Newbie 1 04-26-2005 09:20 AM
403 Forbidden JanDeMan Linux - Newbie 7 04-12-2004 03:02 PM
403 forbidden Flawless Slackware 4 03-04-2003 07:24 AM
403 Forbidden??? morbo Linux - Networking 11 07-04-2002 10:17 AM


All times are GMT -5. The time now is 09:01 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 Google+: linuxquestions
Open Source Consulting | Domain Registration