ISPConfig3 and SEF/Mod_Rewrite Issues

Discussion in 'General' started by koltz, Feb 18, 2009.

  1. koltz

    koltz Member

    I am migrating my sites from my ISPConfig2 site to the 3.0.0.9 RC2. Everything is working so far except SEF. I am mostly running Joomla based sites and all were working perfectly (and still are) under the ISPConfig 2 server. I have verified mod_rewrite is installed and enabled, though when I enable it with the .htaccess file, I just receive the error 500 in my browser. Any help would be greatly appreciated!

    Thanks,

    Corey
     
    Last edited: Feb 18, 2009
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Take a look in the error log and fix the error mentioned there.
     
  3. koltz

    koltz Member

    Update, I changed this in the vhost file of the site
    Code:
            AllowOverride Indexes AuthConfig Limit FileInfo
    to
    Code:
            AllowOverride All
    And now I don't get the 500 error, but I do just get a blank screen.
     
  4. koltz

    koltz Member

    Here is the error message before I Allowed All


    Code:
    [Wed Feb 18 14:52:10 2009] [alert] [client 172.21.153.104] /var/www/example.com/web/.htaccess: Options not allowed here
    
    After I changed it:

    Code:
    [Wed Feb 18 15:22:27 2009] [error] [client 172.21.153.104] File does not exist: /var/www/example.com/web/administrator/plugins, referer: http://example.com/administrator/index.php
     
  5. _X_

    _X_ New Member

    try commenting out:

    Options +FollowSymLinks

    in htaccess so it looks like:
    # Options +FollowSymLinks

    and add:
    Options FollowSymLinks

    to Site Directives.
     
  6. koltz

    koltz Member

    Pretty much the same thing. On the one I posted, I can get to some of the site now, but not everywhere (though does it when changed back). On another site, still just a blank screen.
     
  7. koltz

    koltz Member

    I think I found the problem/solution. The memory_limit was at 8M, bumped to 16M, same thing, bumped it to 64M and so far everything is working. I will do some more testing though and post back. If this is the issue, might be something to look at changing during the install procedure to bump it up a bit?
     
  8. _X_

    _X_ New Member

    You can change default memory limit with apache directives:
    php_admin_value memory_limit 24M

    or change 24 into 64 if needed

    here are apache directives that i use for joomla sites:

    Code:
    <Directory "/var/www/web[B]XXX[/B]/web">
    Options FollowSymLinks
    php_admin_flag register_globals Off
    php_admin_value disable_functions "show_source system shell_exec passthru exec phpinfo popen proc_open"
    php_admin_flag allow_url_fopen Off
    php_admin_flag magic_quotes_gpc On
    php_admin_value session.save_path "/var/www/web[B]XXX[/B]/phptmp/"
    php_admin_value memory_limit 24M
    php_admin_value open_basedir "/var/www/web[B]XXX[/B]/"
    </Directory>
    change XXX acordingly

    if needed change memory limit to 64M

    in htaccess file should be just:
    - in case of joomla 1.0.x (based on 1.0.15):
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$  [NC]
    RewriteRule ^(content/|component/) index.php
    RewriteRule (.*) index.php
    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]
    - PHP Safe Mode is disabled for joomla 1.0.x

    - in case of joomla 1.5.x (based on 1.5.9)
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
    RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
    RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
    RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
    RewriteRule ^(.*)$ index.php [F,L]
    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]
     
  9. koltz

    koltz Member

    Thank you for the post. Very helpful!
     
    Last edited: Feb 21, 2009
  10. SamTzu

    SamTzu Active Member

    Is it possible to move that in to the site's apache directives?
    .htaccess is difficult to manage since it does not alway copy/move properly.


    Sam
     
  11. falko

    falko Super Moderator Howtoforge Staff

    Yes, you can use the "Apache Directives" field for this.
     

Share This Page