How to allow rewrite_mode for all clients websites/apps ?

Discussion in 'Installation/Configuration' started by Keoz, Dec 31, 2016.

  1. Keoz

    Keoz Member


    I can not decide if I must change or not my websites directories default location when I modify the "000-default.conf" :


    My purpose is to allow "rewrite_mod" for all clients websites or application to be installed on my apache2 server.

    *** Websites default loc ***
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html
    *** My websites loc / ISP CONFIG3 ***

    ///// MODIFICATIONS ///////
    These are modifications to bring (from a tutorial on the web) :
    - enable rewrite module on apache (DONE)
    - add the followings to /etc/apache2/sites-available/000-default.conf :
    <Directory /var/www/html>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all

    /////// QUESTION
    What the modification should be set like to allow rewrite_mod for all clients websites ?

    <Directory /var/www/html> (default) ?
    <Directory /var/www/clients> ?
    ....... ?

    Need some help and guidance asap please.

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    What you are doing above is to dig a huge security hole into your server, so never alter the default.conf file in that way.

    If you want to have a specific config in all websites, then add it to the vhost master configuration file from ISPConfig.

    Btw. mod_rewrite is always on for all sites on the server when you installed your server as described in the perfect server tutorials, there is no additional change in any config file required.
  3. Keoz

    Keoz Member

    Thanks !

    I could surely add this settings to the "ispconfig.vhost" file....
    I also red on the web (link below) that since Apache2 was upgraded server version 2.2 has been upgraded to version 2.4.x, all default and new websites files whithin "sites-available" directory must have the default ".vhost" extension changed to ".conf".

    /// Q1
    As the "sites-available" directory contains both the "ispconfig.vhost" and the "ispconfig.conf" file, what am I then supposed to do ?

    /// SOURCE


  4. till

    till Super Moderator Staff Member ISPConfig Developer

    No, this is NOT the case on ISPConfig systems. Don't do that, if you would do it then you break your server. In case you did any of the steps mentioned in that guide then undo them, do not restart apache and do not use ispconfig until all is back to its original state. all you do when you upgrade a server from apache 2.2 to 2.4 is to run an ispconfig update with reconfigure services = yes and then run tools > resync to update the website configuration, that's all.
    Last edited: Jan 6, 2017
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    Beside that' I don't know why you talk about the ispconfig.conf file, the ispconfig.conf is not related to anything that is covered in this thread and not related to mod_rewrite on your system at all. So do not touch it. Reread my post #2, mod_rewrite is already on by default, no changes required. If your mod_rewrite rule does not work, then check your rule as there are no changes in the overall server configuration required, mod_rewrite is already on for all sites.

Share This Page