Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 14th May 2014, 15:12
skippy59 skippy59 is offline
Junior Member
 
Join Date: May 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default ISPCONFIG 3 / .htaccess/ rewrite

Hi,

I 've installed a web app that needs url rewriting. This .htaccess works well on a non ispconfig server :

Options -Indexes FollowSymLinks MultiViews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?prado_path_info=$1&%{QUERY_STRING} [L]

but doesn't work on ispconfig

I've had manually apache2 directives in the ISPconfig interface :

<Directory /var/www/mercier-automobiles.local/web>
AllowOverride All
</Directory>

<Directory /var/www/clients/client7/web7/web>
AllowOverride All
</Directory>

et here is the vhost conf file:

<Directory /var/www/mercier-automobiles.local>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost XXX.XXX.XXX.XXX:80>
DocumentRoot /var/www/mercier-automobiles.local/web

ServerName mercier-automobiles.local
ServerAlias www.mercier-automobiles.local
ServerAdmin webmaster@mercier-automobiles.local

ErrorLog /var/log/ispconfig/httpd/mercier-automobiles.local/error.log

Alias /error/ "/var/www/mercier-automobiles.local/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html

<IfModule mod_ssl.c>
</IfModule>

<Directory /var/www/mercier-automobiles.local/web>
Options +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client7/web7/web>
Options +FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>




# suexec enabled
<IfModule mod_suexec.c>
SuexecUserGroup web7 client7
</IfModule>
# Clear PHP settings of this website
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler None
</FilesMatch>
# php as fast-cgi enabled
# For config options see: http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html
<IfModule mod_fcgid.c>
IdleTimeout 300
ProcessLifeTime 3600
# MaxProcessCount 1000
DefaultMinClassProcessCount 0
DefaultMaxClassProcessCount 100
IPCConnectTimeout 3
IPCCommTimeout 600
BusyTimeout 3600
</IfModule>
<Directory /var/www/mercier-automobiles.local/web>
<FilesMatch "\.php[345]?$">
SetHandler fcgid-script
</FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php3
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php4
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php5
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client7/web7/web>
<FilesMatch "\.php[345]?$">
SetHandler fcgid-script
</FilesMatch>
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php3
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php4
FCGIWrapper /var/www/php-fcgi-scripts/web7/.php-fcgi-starter .php5
Options +ExecCGI
AllowOverride All
Order allow,deny
Allow from all
</Directory>


# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web7 client7
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client7/web7/webdav>
<ifModule mod_security2.c>
SecRuleRemoveById 960015
SecRuleRemoveById 960032
</ifModule>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client7/web7/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>

<Directory /var/www/mercier-automobiles.local/web>
AllowOverride All
</Directory>

<Directory /var/www/clients/client7/web7/web>
AllowOverride All
</Directory>
</VirtualHost>


Thanks for help
Reply With Quote
Sponsored Links
  #2  
Old 14th May 2014, 15:38
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
Default

Does it work when you take away the Option line from the .htaccess?
__________________
Marius Cramer

pixcept KG
Reply With Quote
  #3  
Old 14th May 2014, 15:43
skippy59 skippy59 is offline
Junior Member
 
Join Date: May 2014
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No it doesn't work

here is the rewrite log :

XXX.XXX.XXX.XXX - - [14/May/2014:15:36:20 +0200] [www.mercier-automobiles.local/sid#b74cc018][rid#b23c5058/initial] (3) [perdir /var/www/mercier-automobiles.local/web/] strip per-dir prefix: /var/www/mercier-automobiles.local/web/index.php -> index.php
XXX.XXX.XXX.XXX - - [14/May/2014:15:36:20 +0200] [www.mercier-automobiles.local/sid#b74cc018][rid#b23c5058/initial] (3) [perdir /var/www/mercier-automobiles.local/web/] applying pattern '^(.*)$' to uri 'index.php'
XXX.XXX.XXX.XXX - - [14/May/2014:15:36:20 +0200] [www.mercier-automobiles.local/sid#b74cc018][rid#b23c5058/initial] (4) [perdir /var/www/mercier-automobiles.local/web/] RewriteCond: input='/var/www/mercier-automobiles.local/web/index.php' pattern='!-d' => matched
XXX.XXX.XXX.XXX - - [14/May/2014:15:36:20 +0200] [www.mercier-automobiles.local/sid#b74cc018][rid#b23c5058/initial] (4) [perdir /var/www/mercier-automobiles.local/web/] RewriteCond: input='/var/www/mercier-automobiles.local/web/index.php' pattern='!-f' => not-matched
XXX.XXX.XXX.XXX - - [14/May/2014:15:36:20 +0200] [www.mercier-automobiles.local/sid#b74cc018][rid#b23c5058/initial] (1) [perdir /var/www/mercier-automobiles.local/web/] pass through /var/www/mercier-automobiles.local/web/index.php
Reply With Quote
  #4  
Old 14th May 2014, 18:10
Croydon Croydon is offline
ISPConfig Developer
 
Join Date: Jul 2007
Location: Koblenz, Germany
Posts: 922
Thanks: 16
Thanked 259 Times in 206 Posts
 
Default

From what I see in the rewrite log, the rewrite is working correctly.
What about logs from other url calls (not just calling / or /index.php)?
__________________
Marius Cramer

pixcept KG
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Control Panel - E-mail Tab is empty domi-nik General 15 14th April 2011 18:17
ISPConfig, Drupal, and .htaccess jon335 General 23 16th November 2008 13:22
ISPConfig .htaccess problems. Code5 General 3 23rd July 2008 08:21
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 15:55
ISPConfig and .htaccess ionut89 Feature Requests 1 17th October 2006 17:45


All times are GMT +2. The time now is 08:37.


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