#1  
Old 13th August 2011, 02:46
MetZ MetZ is offline
Junior Member
 
Join Date: Aug 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default Modify Apache httpd.conf

Hi all.

How can I set:

1) mod_rewrite enabled

2) Set AllowOverwrite to All

For every single client/domain that is added as default?? All my websites applications require these to be set to function properly.

Can I simply edit main apache conf? Or do I need to do any modifications to ISPconfig3?

Running ISPConfig3.0.3.3

thanks for any and all help provided!!
Reply With Quote
Sponsored Links
  #2  
Old 13th August 2011, 09:50
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,665
Thanks: 819
Thanked 5,316 Times in 4,169 Posts
Default

1) mod_rewrite is always loaded in ispconfig 3.
2) AllowOverwrite ALL is the default for all websites in ISPConfig 3.

If thats not the case in your setup, then the server was either not installed as described in the perfect setup guide or you use a outdated version of ispconfig. The current ispconfig version is 3.0.3.3, if your version is older, then you should update.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 13th August 2011, 17:59
MetZ MetZ is offline
Junior Member
 
Join Date: Aug 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Okei..
So here it goes:

Installed from: http://www.howtoforge.com/perfect-se...nx-ispconfig-3

Installed latest ISPconfig3.0.3.3

Have added a couple of domains, and when I give htaccess files to them, they will not rewrite as they should..

Have created a phpinfo file to check for mod_rewrite, it does not appear in the php info.

The thing is, I am going to setup 3 websites on my server, all using cakephp as framework.

When I setup the site, with all configs as it should be, I only get a blank page. No errors or logging to anything (syslog, cakephp debug/error logs).

I am wondering, how to get it going. Have tried regular PHP, suPHP and suexec for the website, but nothing changes.

Are there any "main" httpd.conf I need to edit with the mod_rewrite? or something like that?

Anyone with experience running Cakephp apps when using ispconfig, please lend me a hand.

Thanks!
-Tom
Reply With Quote
  #4  
Old 14th August 2011, 00:04
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,665
Thanks: 819
Thanked 5,316 Times in 4,169 Posts
Default

Quote:
Have created a phpinfo file to check for mod_rewrite, it does not appear in the php info.
mod_rewrite is a apache module and not a php modle, so it will not be displayed in phpinfo.

Quote:
When I setup the site, with all configs as it should be, I only get a blank page. No errors or logging to anything (syslog, cakephp debug/error logs).
Check the error.log of the website, not the global error.log

The correct settings for a php based cms system are:

php mode: fastcgi
suexec: on

and make sure that you uploaded the files with the FTP user of that site, so that the files are owned by the corect user and group. If you instaled the files as root user then you will have to chown them to the web user and client group of that website.


Quote:
Are there any "main" httpd.conf I need to edit with the mod_rewrite? or something like that?
Thats not needed. If you followed the tutorial, you enabled mod_rewrite already in step 14. You can test if mod_rewrite is enabled with:

a2enmod rewrite
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 14th August 2011, 00:19
MetZ MetZ is offline
Junior Member
 
Join Date: Aug 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi..

a2enmod rewrite = Module rewrite already enabled

Error.log = .htaccess: Invalid command
.htaccess
Code:
RewriteEngine On
RewriteRule ^link([^/]*).html$ rewrite.php?link=$1 [L]
I am trying to get this rewrite going, using a a test script to check whats what.

I can not understand why rewrite is not working on my system.. I uploaded all files trough my created ftp account for that site/client.

# ls -all display correct ownership of files (web1:client1)

What vhost config files are in use?
- /etc/apache2/sites-enabled
- /etc/apache2/sites-available

Or are there any other files that might result in htaccess not working?

-Tom
Reply With Quote
  #6  
Old 14th August 2011, 01:00
erosbk erosbk is offline
Senior Member
 
Join Date: Mar 2011
Posts: 337
Thanks: 49
Thanked 36 Times in 30 Posts
Default

I have this working on one of my sites, please, try with this to see if rw is working

Code:
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^domain.tld [nc]
rewriterule ^(.*)$ http://www.domain.tld/$1 [r=301,nc]
Regards
Reply With Quote
  #7  
Old 14th August 2011, 01:13
MetZ MetZ is offline
Junior Member
 
Join Date: Aug 2011
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Now.. Something strange happened...

I was adding everything trough admin account, and no rewrite was working at all.

After my last reply in this thread I thougth, what if I delete the domain/site trough ispconfig, and add a reseller, and add the domain/site trough that reseller account.

I created a reseller account, logged in, created a new client + domain/site.
Tried the rewrite script, exactly same error (however, I noticed a "client0" had appeard in /var/www/clients/.

OK, I thought, and just deleted everything again, logged in to phpmyadmin as root, and edited all the db tables for ispconfig "auto-increment" values, to set next site/domain/ftp/db id to the next value (I like my dbs to be clean you can say). Then I went ahead again, as admin, and re-added the website, and ftp account. Uploaded the rewrite.php + htaccess file, and, wtf, it works!?!

Now rewrite.php are working as it should.. and the only thing I did was to create and delete a reseller + client/website on that reseller account.

The client0 are still located in my /var/www/clients/client0, it is an empty folder. Could this have something to do with it?

Strange!!

Edit: Had another domain on my server where rewrite was not working, just tested with the same script, and rewrite works there as well (did nothing to that domain/site/client - except uploading the rewrite.php + htaccess after it suddenly worked on the other domain).

-Tom

Last edited by MetZ; 14th August 2011 at 01:17.
Reply With Quote
Reply

Bookmarks

Tags
apache, htaccess, ispconfig3, mod_rewrite

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
trying to install roundcubemail ressel Installation/Configuration 13 24th December 2009 20:13
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 20:58
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45


All times are GMT +2. The time now is 09:35.


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