got 500 internal server error tried to enable chmod from FTP

Discussion in 'Installation/Configuration' started by smilem, Jan 15, 2008.

  1. smilem

    smilem New Member

    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
     
  2. smilem

    smilem New Member

    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=cach...nternal Server Error&hl=lt&ct=clnk&cd=1&gl=lt

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

    edge Active Member Moderator

    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
     
    Last edited: Jan 15, 2008
  4. smilem

    smilem New Member

    Thanks, this solved the error :D
     
  5. smilem

    smilem New Member

    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?
     
    Last edited: Jan 15, 2008
  6. Hans

    Hans Moderator ISPConfig Developer

    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.
     
  7. smilem

    smilem New Member

    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>
     
    Last edited: Jan 15, 2008
  8. Hans

    Hans Moderator ISPConfig Developer

    :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.
     
  9. smilem

    smilem New Member

    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.
     
  10. smilem

    smilem New Member

    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.
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not a bug, its totally correct.

    The first domain is the website itself, you entered it in the site settings. You can not add a second domain as you limited the number of domains to 1.
     
  12. smilem

    smilem New Member

    Yes I entered 1 but ISPconfig when I pasted the code to add apache directives increased it to 2. Now I wan't my user that has 1 website to have 1 website ONLY, but in website settings "Basis " tab I see max domain = 2

    Doesn't that mean that user can have 2 domains?
     
  13. Hans

    Hans Moderator ISPConfig Developer

    Yes, the client have 2 domains already:
    www.yourdomain.tld and a co-domain yourdomain.tld (without www), which is necesarry to deliver e-mail to e-mailadresses on your domain @yourdomain.tld. This means also that the site can be visited at http://www.yourdomain.tld and http://yourdomain.tld. This is normal and you have nothing to worry about.
     
  14. smilem

    smilem New Member

    Thanks for explanation.
     

Share This Page