HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=16)
-   -   Yet Another Internal Server Error/.htaccess Post (http://www.howtoforge.com/forums/showthread.php?t=36597)

n0h4t 16th June 2009 10:54

Yet Another Internal Server Error/.htaccess Post
 
Hi All,

Firstly thanks to Falko, Till and the other moderators for a great job they are doing here.

I have installed a php script by the name of "amember" on an ISPConfig controlled machine running Centos 5.2 & Apache 2 and I get this "internal error 500" message with my .htaccess files. These files are necessary for my "amember" script and altering them is not an option.

I have read similar posts on this forum and tried many of the solutions and I have come to a dead end and wondered if anyone would be kind enough to give me some advice.

Sample Error.log:
Quote:

[Mon Jun 15 14:55:24 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:24 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:24 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:26 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:26 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:26 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:26 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:26 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 14:55:26 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: Options not allowed here
[Mon Jun 15 15:37:22 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:37:22 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:37:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:37:25 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:39:41 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:39:41 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:46:29 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 15:46:29 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 16:39:32 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
[Mon Jun 15 16:39:32 2009] [alert] [client 85.180.187.166] /var/www/web15/web/.htaccess: <Directory not allowed here
Things I Tried httpd.conf:-

General
Quote:

# First, we configure the "default" to be a very restrictive set of
# permissions.
#
<Directory /var/www/web15/web>
AllowOverride All
</Directory>
&

Directories
Quote:

# AllowOverride None

<Directory "/var/www/web15/web">
Options +FollowSymLinks +Includes -Indexes
AllowOverride All
# AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
Allow from all

<Files ~ "^\.ht">
Deny from all
</Files>
</Directory>
.htaccess file in root:-
Quote:

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^fxsignaltrader\.co.uk$ [NC]
RewriteRule ^(.*)$ http://www.fxsignaltrader.co.uk/$1 [R=301,L]

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*
IndexIgnore */*
IndexIgnore *.gif *.jpg

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
.htaccess file in sample directory:-
Quote:

########### AMEMBER START #####################
Options +FollowSymLinks
RewriteEngine On

## allow access for product #1
RewriteCond %{HTTP_COOKIE} amember_nr=([a-zA-Z0-9]+)
RewriteCond /home/signal/public_html/fxstam/data/new_rewrite/%1-1 -f
RewriteRule ^(.*)$ - [L]

## if user is not authorized, redirect to login page
# BrowserMatch "MSIE" force-no-vary
RewriteCond %{QUERY_STRING} (.+)
RewriteRule ^(.*)$ http://www.fxsignaltrader.co.uk/fxstam/plugins/protect/new_rewrite/login.php?v=-1&url=%{REQUEST_URI}?%{QUERY_STRING} [L,R]
RewriteRule ^(.*)$ http://www.fxsignaltrader.co.uk/fxstam/plugins/protect/new_rewrite/login.php?v=-1&url=%{REQUEST_URI} [L,R]
########### AMEMBER FINISH ####################
Just in case this might be needed the Virtualhost entry:-
Quote:

######################################
# Vhost: www.fxsignaltrader.co.uk:80
######################################
#
#
<VirtualHost 208.70.146.253:80>
ServerName www.fxsignaltrader.co.uk:80
ServerAdmin radley@fxsignaltrader.com
DocumentRoot /var/www/web15/web
ServerAlias fxsignaltrader.co.uk blog.fxsignaltrader.co.uk
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
Alias /cgi-bin/ /var/www/web15/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web15/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web15/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web15/phptmp/
php_admin_value session.save_path /var/www/web15/phptmp/
<IfModule mod_ruby.c>
<Directory /var/www/web15/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>
<IfModule mod_python.c>
<Directory /var/www/web15/web>
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride Indexes AuthConfig Limit FileInfo
Order allow,deny
allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
AddType application/vnd.wap.wmlscriptc .wmlsc .wsc
AddType text/vnd.wap.wml .wml
AddType text/vnd.wap.wmlscript .ws .wmlscript
AddType image/vnd.wap.wbmp .wbmp
Alias /error/ "/var/www/web15/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web15/user/$1/web/$3
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
</VirtualHost>

As with the other people with similar problems when I rename my .htaccess files everything works fine, well the error doesn't occur. Sorry for such a long post!

Thanks in advance!

Best Regards,

Dave

till 16th June 2009 15:12

The error message explians it already, you have options in your .htaccess file that yre not allowed for .htaccess files in your setup. So the solution is the same then posted in all similar threads, either you add these directives to the apache directives field of the website in ispconfig which is the preferred solution or you allow overriding of all values trogh .htaccess files which works but is insecure.

HooGLaNDeR 16th June 2009 15:34

It seems that mod rewrite hasn't been enabled.

till 16th June 2009 15:52

No, thats not related to mod_rewrite. Just do what I suggested above.

n0h4t 16th June 2009 17:37

Thanks Till & Hooglander for taking the time to answer my post. I 'll give it a try later tonight, thanks again.

Best Regards,

Dave

HooGLaNDeR 16th June 2009 17:43

Quote:

Originally Posted by n0h4t (Post 194631)
Thanks Till & Hooglander for taking the time to answer my post. I 'll give it a try later tonight, thanks again.

Best Regards,

Dave

You can use the "thanks" button under the post ;) This has the same effect.


All times are GMT +2. The time now is 20:30.

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