How to set AllowOverride All for .htaccess

Discussion in 'Installation/Configuration' started by Atreides, Sep 19, 2014.

  1. Atreides

    Atreides Member

    Dear users,

    I've difficulties by let .htaccess read the following istructions:

    Code:
    php_value max_execution_time 6000
    php_value error_reporting 2
    php_value display_errors 0
    php_flag allow_call_time_pass_reference 1
    I'm in a fresh installation of Debian 7 + Apache + MySQL, followed the tutorial from ISPconfig.

    May you give me an help in order to let is work?
    None of the guides I found in the web and in the forum helped me, neither the Italian Ubuntu Forum.

    Thanks a lot
    Best
    Simone
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The sites have already AllowOverrde all for .htaccess files. But your problem is not related to that option.

    The options that you posted above are for the apache module mod_php, they dont work for other php modes like fastcgi. For fastcgi, you simply enter these lines:

    max_execution_time = 6000
    error_reporting = 2
    display_errors = 0
    allow_call_time_pass_reference = 1

    in the php.ini direktives field of the website in ispconfig.
     
  3. Atreides

    Atreides Member

    Hi Till,

    exactly! You are totally right in fact after changing from FAST-CGI to ModPHP everything is working.

    The problema now is that because a website was already running with FastCGI, changing to ModPHP also changes all the files and folder permissions.

    What to do now to solve it?

    Thanks a lot for your help!
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Do not switch to mod_php, mod_php is insecure as it removes the security features. I posted the solution above, switch back to fastcgi and follow the instructions.
     
  5. Atreides

    Atreides Member

    Hi Till,

    thanks a lof for the useful info you are sharing with me, and us.

    I'm happy to use PHP Fast-CGI but I read that I can't protect folders with .htaccess and .htpasswd, is this correct?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats not correct. Folder protections and .htaccess are not related to to the used php mode at all.
     
  7. Atreides

    Atreides Member

    Hi Till,

    I added them in the ISPconfig panel, in the website tab, but i get a 500 error when I run the install page that has that requirements.

    How is that possible?

    Thanks!

    UPDATE: even if i delete them, all the website gives me 500 error.
     
    Last edited: Sep 19, 2014
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    From above:

    "in the php.ini direktives field of the website in ispconfig."

    There is just one filed labeled php.ini in ispconfig in the website settings on the options tab, you cant miss it.
     
  9. Atreides

    Atreides Member

    UPDATE: I did it, but i get 500 error, even if i delete them, all the website gives me 500 error.
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    You can find the reason for the error in the error.log of that website.
     
  11. Atreides

    Atreides Member

    Hi Till,

    the MOD-PHP selection let htaccess rules works, but i'm facing a bigger issue in my server, and it's about file and folder permissions.

    I setup a new website selecting MOD-PHP and the script, like vTiger CRM or Wordpress, say that files are not writable. But I saw that happening only when I upload files via FTPS, with the ROOT account.

    Do you have any clue why it's happening?

    Thanks again!
    Best
     
    Last edited: Sep 19, 2014
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    I guess you havent read my post #4 where I told you to NOT use mod_php. All issues that you posted above are caused by using mod_php.

    mod_php is a deprecated php mode, it is for servers only that do not host more then 1 website as it allows a hacker or client that has access to one website to access and modify all other sites as well and mod_php websites may not run a cms that uploads any files or images on the server as they run php under a wrong user, so you can use it only for "read only" sites and not cms systems. So you see, using mod_php makes no sense at all and nobody that installs a new site these days uses mod_php anymore.

    And regarding uploads: when you upload something as root and not as ftp or ssh user of the website, then you have to chown all uploaded files to the website user and client group of that website.
     
    Last edited: Sep 19, 2014

Share This Page