PDA

View Full Version : ISPConfig3 and SEF/Mod_Rewrite Issues


koltz
18th February 2009, 23:03
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

till
18th February 2009, 23:27
Take a look in the error log and fix the error mentioned there.

koltz
18th February 2009, 23:33
Update, I changed this in the vhost file of the site
AllowOverride Indexes AuthConfig Limit FileInfo

to
AllowOverride All

And now I don't get the 500 error, but I do just get a blank screen.

koltz
19th February 2009, 00:00
Here is the error message before I Allowed All


[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:

[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

_X_
19th February 2009, 04:18
try commenting out:

Options +FollowSymLinks

in htaccess so it looks like:
# Options +FollowSymLinks

and add:
Options FollowSymLinks

to Site Directives.

koltz
19th February 2009, 17:48
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.

koltz
19th February 2009, 20:27
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?

_X_
20th February 2009, 00:33
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:

<Directory "/var/www/webXXX/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/webXXX/phptmp/"
php_admin_value memory_limit 24M
php_admin_value open_basedir "/var/www/webXXX/"
</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):
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)
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]

koltz
21st February 2009, 03:21
Thank you for the post. Very helpful!

SamTzu
16th May 2009, 13:54
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

falko
17th May 2009, 20:32
Yes, you can use the "Apache Directives" field for this.