LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   403 Forbidden (https://www.linuxquestions.org/questions/linux-newbie-8/403-forbidden-386996/)

1veedo 11-27-2005 12:55 PM

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.

teebones 11-27-2005 01:57 PM

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!

1veedo 11-27-2005 05:46 PM

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>



All times are GMT -5. The time now is 07:59 PM.