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)
-   -   got 500 internal server error tried to enable chmod from FTP (http://www.howtoforge.com/forums/showthread.php?t=19507)

smilem 15th January 2008 21:09

got 500 internal server error tried to enable chmod from FTP
 
I tried to enable chmod from FTP program and commented these lines in
/etc/proftpd.conf

# Bar use of SITE CHMOD by default
#<Limit SITE_CHMOD>
# DenyAll
#</Limit>

I restarted the server and
Now I get 500 internal server error

Tried to make like berofe

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

Server still shows 500 internal server error need a FIX asap

Thanks

smilem 15th January 2008 21:27

It seems that 500 error is cause by .htaccess file in joomla instalaltions that I enabled.

here is the code, can someone tell me what causes this?

Code:

##
# @version $Id: htaccess.txt 9795 2008-01-02 11:33:07Z rmuilwijk $
# @package Joomla
# @copyright Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##


#####################################################
#  READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations.  It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file.  If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's.  If they work,
# it has been set by your server administrator and you do not need it set here.
#
# Only use one of the two SEF sections that follow.  Lines that can be uncommented
# (and thus used) have only one #.  Lines with two #'s should not be uncommented
# In the section that you don't use, all lines should start with #
#
#####################################################

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

#
#  mod_rewrite in use

RewriteEngine On


#  Uncomment following line if your webserver's URL
#  is not directly related to physical file paths.
#  Update Your Joomla! Directory (just / for root)

# RewriteBase /


########## Begin - Joomla! core SEF Section
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !^/index.php
RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$  [NC]
RewriteRule (.*) index.php
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
#
########## End - Joomla! core SEF Section


########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode crap to send via URL
RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out any script trying to modify a _REQUEST variable via URL
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Send all blocked request to homepage with 403 Forbidden error!
RewriteRule ^(.*)$ index.php [F,L]
#
########## End - Rewrite rules to block out some common exploits

Also I found on google about thisproblem:
http://209.85.135.104/search?q=cache...lnk&cd=1&gl=lt

Is this a FIX? I need to be able to use FTP to chmod files and to use .htaccess files

edge 15th January 2008 21:47

did you try this?

Code:

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

You can also try to comment out line by line, and see what is causing the "500" error

smilem 15th January 2008 22:03

Quote:

Originally Posted by edge
did you try this?

Code:

##  Can be commented out if causes errors, see notes above.
Options +FollowSymLinks

You can also try to comment out line by line, and see what is causing the "500" error

Thanks, this solved the error :D

smilem 15th January 2008 22:29

BTW could you explain why it caused an error?

Do I need to do like the site said:

Then, edit httpd.conf .. Find out the foll lines and mod -

<Directory “/www/vhosts/localhost”> #replace this with your dir name
Options Indexes FollowSymLinks
Order allow,deny
Allow from all
AllowOverride All #Added
</Directory>

<Directory />
Options FollowSymLinks
# AllowOverride Limit #Old Value
AllowOverride All #Added
Order deny,allow
Deny from all
Satisfy all
</Directory>

I understand that this is ISPconfig security feature that only server admin and reseller can add additional Apache directives into the site's virtual host container manually so that is why .htaccess is disabled?

Hans 15th January 2008 22:55

If you have added AllowOverride All within your apache2.conf or httpd.conf, .htaccess files are allowed on your server in any website.
I think that the internal 500 error occured because you did not have AllowOverride All within your Apache configuration yet.

Personally, i think it is more safe to set AllowOverride None instead of AllowOverride All. AllowOverride None means that .htaccess files are not allowed, but if you use ISPConfig, you can add the following to the Apache directive field for your Joomla site within ISPConfig:

<Directory "/var/www/webX/web">
Options FollowSymLinks
AllowOverride All
</Directory>

Note:
webX is the number of your web as defined ny ISPConfig.

smilem 15th January 2008 23:32

I tried your code and got this error:

This website already has 1 domain(s). You cannot decrease the number of domains.

I entered:

<Directory "/var/www/web1/web">
Options FollowSymLinks
AllowOverride All
</Directory>

Hans 15th January 2008 23:40

:confused: I think this error message has nothing to do with the lines you've added within the Apache directive field. I think you have to increase the value for "Maximum domains" on the basis tab of the site.

smilem 15th January 2008 23:45

Quote:

Originally Posted by Hans
:confused: I think this error message has nothing to do with the lines you've added within the Apache directive field. I think you have to increase the value for "Maximum domains" on the basis tab of the site.

Hmm, on the basis tab, I have:

Max. User: 1
Max. Domain: 2

I created the user and site with admin account, I have no reseller.

smilem 15th January 2008 23:53

It seems I found another bug:

I created a client with admin account then 1 website with 1 user I assigned the user to admin for the site. I set max domains to 1 so the user could not create second domain (actually that would work forreseller correct me if I'm wrog but the logic is the same. If I neet a user to have 1 domain I write 1)

Now the bug happens when you trie to add additional apache directives you get error like I said before, the ispconfig changes the max domain to 2 and you can save the site profile.

I consider this a bug if ispconfig needs to have max 2 to host 1 site I should not be able to create the site from start. Now I discoved this when tried to add additional apache directives.

BTW your code was right it worked i have no more 500 errors.


All times are GMT +2. The time now is 04:48.

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