#1  
Old 15th October 2008, 12:20
Camran Camran is offline
Member
 
Join Date: May 2008
Posts: 30
Thanks: 2
Thanked 3 Times in 3 Posts
Default cgi-bin and htaccess problem

I have installed script for upload center which have cgi based files there is 2 .htaccess file:

one in /var/www/web1/cgi-bin/.htaccess
Code:
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_CGI_AUTHORIZATION:%1]

LimitRequestBody 10000000000000

<IfModule mod_security.c>
       SecFilterEngine Off
       SecFilterScanPOST Off
       SetEnvIfNoCase Content-Type "^multipart/form-data;" MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
</IfModule>
<IfModule mod_gzip.c>
       mod_gzip_on No
</IfModule>

<IfModule mod_deflate.c>
       SetEnvIfNoCase Request_URI testenv.cgi no-gzip dont-vary
       SetEnvIfNoCase Request_URI upload_status.cgi no-gzip dont-vary
       SetEnvIfNoCase Request_URI upload.cgi no-gzip dont-vary
one in /var/www/web1/web/.htaccess
Code:
deny from 127.1.1.4
deny from 127.1.1.1
RewriteEngine on

RewriteRule    ^$                                               /cgi-bin/index.cgi [L]
RewriteRule    ([0-9A-Za-z]{12})-del-([0-9A-Za-z]+)/.+$         /cgi-bin/index.cgi?del=$1-$2 [L]

RewriteCond     %{REQUEST_FILENAME} !-f
RewriteRule    ^([0-9A-Za-z\-_]*)/?([0-9A-Za-z]{12})(/[^\/]*|)(\.html?|$)$      /cgi-bin/index.cgi?op=download1&usr_login=$1&id=$2&fname=$3 [L]

RewriteCond     %{REQUEST_FILENAME} !-f
RewriteCond     %{REQUEST_FILENAME} !-d
RewriteRule    ^([0-9A-Za-z\-_]+)(/[0-9a-z\-_]*/?|$)$           /cgi-bin/index.cgi?op=user_public&usr_login=$1&fld=$2 [L,NC]

RewriteRule    ^latest-files(\d*).html$                         /cgi-bin/index.cgi?op=catalogue&page=$1 [L]

RewriteCond     %{REQUEST_FILENAME} !-f
RewriteRule    ^([a-z0-9\-\_]+).html(.*)                        /cgi-bin/index.cgi?op=page&tmpl=$1$2 [L]
i got403 Error- Forbidden!
when opening site
by the way i have written apache directives also
Apache Directives
(Optional):
<Directory "/var/www/web1/web"> Options FollowSymLinks AllowOverride All </Directory>
thanks for any help
Reply With Quote
Sponsored Links
  #2  
Old 16th October 2008, 15:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,751 Times in 2,581 Posts
Default

Quote:
Originally Posted by Camran View Post
i got403 Error- Forbidden!
when opening site
Are you trying to access a file from /var/www/web1/web or from /var/www/web1/cgi-bin?

What are the outputs of
Code:
ls -la /var/www/web1/web
and
Code:
ls -la /var/www/web1/cgi-bin
?

Any errors in Apache's error log or the web site's error log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 17th October 2008, 11:47
Camran Camran is offline
Member
 
Join Date: May 2008
Posts: 30
Thanks: 2
Thanked 3 Times in 3 Posts
 
Default

Quote:
Originally Posted by falko View Post
Are you trying to access a file from /var/www/web1/web or from /var/www/web1/cgi-bin?

What are the outputs of
Code:
ls -la /var/www/web1/web
and
Code:
ls -la /var/www/web1/cgi-bin
?

Any errors in Apache's error log or the web site's error log?

Solved,

adding

Code:
Options +FollowSymlinks
Options +ExecCGI
solved my all problems.

Thanks
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:05.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.