HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   ISPConfig3 and SEF/Mod_Rewrite Issues (http://www.howtoforge.com/forums/showthread.php?t=31485)

koltz 18th February 2009 22:03

ISPConfig3 and SEF/Mod_Rewrite Issues
 
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 22:27

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

koltz 18th February 2009 22:33

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.

koltz 18th February 2009 23:00

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

_X_ 19th February 2009 03: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 16: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 19: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_ 19th February 2009 23: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:

Code:

<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):
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]


koltz 21st February 2009 02:21

Thank you for the post. Very helpful!

SamTzu 16th May 2009 12: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


All times are GMT +2. The time now is 19:07.

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