Modify Apache httpd.conf

Discussion in 'Installation/Configuration' started by MetZ, Aug 13, 2011.

  1. MetZ

    MetZ New Member

    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!!
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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, if your version is older, then you should update.
  3. MetZ

    MetZ New Member

    So here it goes:

    Installed from:

    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.

  4. till

    till Super Moderator Staff Member ISPConfig Developer

    mod_rewrite is a apache module and not a php modle, so it will not be displayed in phpinfo.

    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.

    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
  5. MetZ

    MetZ New Member


    a2enmod rewrite = Module rewrite already enabled

    Error.log = .htaccess: Invalid command
    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?

  6. erosbk

    erosbk New Member

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

    Options +FollowSymlinks
    RewriteEngine on
    rewritecond %{http_host} ^domain.tld [nc]
    rewriterule ^(.*)$ http://www.domain.tld/$1 [r=301,nc]
  7. MetZ

    MetZ New Member

    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!! :confused:

    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).

    Last edited: Aug 14, 2011

Share This Page