Solved

403 - Forbidden

Posted on 2006-06-09
8
417 Views
Last Modified: 2010-03-04
aaaarrrrrrgh....
I am getting a 403 error for some unknown reason. i have tried everythng that i could think of. I gave read permissions to ALL users and allowed access from anywhere using .htaccess. don't know what to do now. :-(

I can access the last site setup in httpd.conf (testing.domain.com). it gives sql errors for known reasons but i dont see why i cannot see other sites.

========================
% cd $WEBROOT
% ls -ld
drwxrwxr-x  16 allstateforms  allstateforms  512 Apr  5 13:52 .

========================
% ls -l
total 60
...
-rw-rw-r--   1 allstateforms  allstateforms  8571 Mar 22 12:00 index.php
...

========================
% cat .htaccess
Order Deny,Allow

Allow from 00.000.00.0
Allow from 11.111.11.11

Deny from all

RewriteEngine On

RewriteRule ^([^/]+)\.html?(.*)$ index.php?_html_url=$1$2 [L,QSA]

RewriteRule .+\.pdf(.*)$ index.php?page=convert_to_pdf&cmd=download$1 [L,QSA]

========================

/****** relevant part from http.conf ******/

NameVirtualHost 00.000.00.00:80

<VirtualHost 00.000.00.00:80>
        ServerName www.domain.com
        ServerAlias nuppinc.com www.domain.com
        DocumentRoot /home/allstateforms/web
        ErrorLog /home/allstateforms/logs/error_log
        CustomLog /home/allstateforms/logs/access_log common
        Options +Indexes
        Redirect permanent /bugzilla https://dev.domain.com/bugzilla
</VirtualHost>

NameVirtualHost 00.000.00.00:80

<VirtualHost 00.000.00.00:80>
        ServerName dev.domain.com
        DocumentRoot /home/allstateforms/testweb/dev
        ErrorLog /home/allstateforms/logs/dev_error_log
        CustomLog /home/allstateforms/logs/dev_access_log common
        Options +Indexes
        Redirect permanent /bugzilla https://dev.domain.com/bugzilla/
        Alias /phpMyAdmin/ "/home/allstateforms/tools/phpMyAdmin/"
</VirtualHost>

<Directory /home/allstateforms/tools/bugzilla>
        AddHandler cgi-script .cgi
        Options +Indexes +ExecCGI +FollowSymLinks
        DirectoryIndex index.cgi
        AllowOverride Limit
</Directory>

NameVirtualHost 00.000.00.00:8080
<VirtualHost 00.000.00.00:8080>
        DocumentRoot /home/testers/web
        ServerName testing.domain.com
        ErrorLog /home/testers/web/err.log
        TransferLog /home/testers/web/access.log
        Alias /phpMyAdmin/ "/home/testers/db/phpMyAdmin/"
</VirtualHost>
0
Comment
Question by:jhshukla
  • 4
  • 2
8 Comments
 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
Try moving Deny from all to above your allow commands...
0
 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
Wait, I think you have the wrong order statement:

Deny,Allow
    The Deny directives are evaluated before the Allow directives. Access is allowed by default. Any client which does not match a Deny directive or does match an Allow directive will be allowed access to the server.
Allow,Deny
    The Allow directives are evaluated before the Deny directives. Access is denied by default. Any client which does not match an Allow directive or does match a Deny directive will be denied access to the server.

see:

http://httpd.apache.org/docs/2.0/mod/mod_access.html

for examples.

I think you want:

Order Allow,Deny
Allow from 00.000.00.00/29
Allow from 11.111.11.11
Deny from all

... It's the first one matched that will be returned;  in this case, the allows take precedence over the denies.
0
 
LVL 9

Author Comment

by:jhshukla
Comment Utility
oh i forgot to mention... i haven't modified the .htaccess file.
it was working before i started working here, i added the last virtual host in the httpd.conf and the problems began. btw, deny by default is intentional. the site is still pre-alpha and we want to test it before we make it public. and obviously, we don't want competitors to look at it until the it is launched.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
This section:

<Directory /home/allstateforms/tools/bugzilla>
        AddHandler cgi-script .cgi
        Options +Indexes +ExecCGI +FollowSymLinks
        DirectoryIndex index.cgi
        AllowOverride Limit
</Directory>

is outside of a VirtualHost container -- why?
0
 
LVL 9

Author Comment

by:jhshukla
Comment Utility
beat me to death ... plz. server was looking at the wrong .htaccess file.

DocumentRoot /home/allstateforms/testweb/dev
should have been
DocumentRoot /home/allstateforms/dev

thx.
0
 
LVL 15

Expert Comment

by:periwinkle
Comment Utility
Works for me!
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
Comment Utility
Closed, 125 points refunded.
Netminder
Site Admin
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
It is possible to boost certain documents at query time in Solr. Query time boosting can be a powerful resource for finding the most relevant and "best" content. Of course the more information you index, the more fields you will be able to use for y…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now