ISPconfig 3.0.5.4p9 Web domain options textareas max char length issue

Discussion in 'General' started by orasis, Jul 27, 2016.

  1. orasis

    orasis Member

    Hi, this is something I wanted to come and post a while ago and found the chance now.
    When saving Custom php.ini settings or Apache Directives for a site, textarea fields have a very low max character limit, I haven't checked the database about what limit that is, but surely it is a problem witch can cause a site to completely return error 500 when half of that configuration gets saved.

    In my case I have to both use .htaccess and Apache directives fields to split my configuration although I wanted to have it all in ISPconfig. Also I must always remove comments in order to avoid hitting that limit. And why my configuration gets so big ? because I use many specific mod_security rules for each site separately plus many other things which in a plain .htaccess file are not much at all, but get cut in ISPconfig.

    What I would suggest, in case this is a "TEXT" (64 KiB) in mysql, switch to "MEDIUMTEXT" (16 MiB).

    EDIT:
    Another important text field that has a very low char limit is the PHP open_basedir which is most possibly VARCHAR. If you put too much there (which I do on one of my setups) they don't fit and this is very very bad.

    Thanks for your replies in advance,
    George
     
    Last edited: Jul 27, 2016
  2. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Log an issue at https://git.ispconfig.org/ispconfig/ispconfig3/issues for this.

    Possibly a help/workaround for now, you can create snippets of common config you put into multiple sites, and select those snippets to be used for all the relevant sites, which will keep the per-site textarea's smaller. That is, of course, if you have such common snippets among multiple sites.
     
  3. orasis

    orasis Member

    Hi Jesse thanks for your reply, I probably will post it there as well.
    Your workaround made me also think of another way to get rid of the many mod_security rules inside ISPconfig, to create mod_security specific .conf files for each site and modify them using ssh and then take advantage of the service apache2 reload instead of the complete restart that ISPconfig does when you save changes to a site.

    By the way, I forgot to mention in my previous post that another important text field that has a very low char limit is the PHP open_basedir which is most possibly VARCHAR. If you put too much there (which I do on one of my setups) they don't fit and this is very very bad.
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig reloads apache. Arestart is only used when it is required e.g. by adding a ssl cert.
     
  5. orasis

    orasis Member

    Surely I haven't checked the code to say what I said, but when saving a site via ISPconfig and changes need to be applied it does not "feel" like a reload of apache. When I reload apache using service apache2 reload it takes 1 or 2 seconds and if I refresh the browser at that very moment I am only being a little delayed but I do get the the page to load finally. But if I save a site via ISPconfig and refresh the page on the browser I get a connection error from either CloudFlare or on LAN, which takes about 5 seconds to go away. This has not happened just once, it happens every time. So I thought it does a complete restart.

    Any explanation why a simple ssh reload of the service doesn't behave the same way ?
    thanks,
    George
     
  6. vilhena

    vilhena New Member

    Hello.

    Did you got a workaround?

    I'm facing the same problem, and I don't know what to do! In ISPConfig version 3.0.4.3 this works ok.

    Regards,
    Vilhena
     
  7. orasis

    orasis Member

    Hi vilhena, I didn't yet, I found myself very busy with my job and cannot find the time to get on this unfortunately. What is your problem exactly ? the length of the fields or the apache restarts ?
     
  8. vilhena

    vilhena New Member

    Hello orasis.

    My problem is with the length in the filelds, specifically the apache directive fields.
    Thanks.
     
  9. orasis

    orasis Member

    Until this gets fixed try to remove comments and use .htaccess as well
     
  10. vilhena

    vilhena New Member

    Yeah but the problem is that ProxyPass is not available in .htaccess only in Context: server config, virtual host, directory.

    I really don't know what to do :/
    I have more tha 30 ProxyPass statements in the other version of ISPConfig and it works like a charm!

    Thanks.
     
  11. orasis

    orasis Member

    Did you try Jesse's solution ? Maybe Till could make a small patch until the next update. I am even more worried about the open_basedir field..
     
  12. vilhena

    vilhena New Member

    No can do, all of the links are specific to one virtualhost.
    @till is there a way to fix this?

    Thanks for all the help.

    Regards,
    Vilhena
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Your proxy pass problem is not related to a limitation of the field length, the limit is 16 megabytes for quite some time (and in all current 3.0.5.4pX releases) and before it was 64 kilobytes which was also large enough for all normal use cases and way enough for your proxy directive. Back to your problem, your proxy directive is probably not added because apache rejected it, you can easily check this with the debug mode and you should find a vhost.err file then.
     
  14. vilhena

    vilhena New Member

    Well, I don't think that it's related to the proxy directive. Let me explain:

    If I put these directives in the apache directive field I don't get a .vhost.err
    ProxyPass /ifa http://www.medicina.ulisboa.pt/ensino/formacao-avancada/informacoes-gerais-e-comuns/
    ProxyPassReverse /ifa http://www.medicina.ulisboa.pt/ensino/formacao-avancada/informacoes-gerais-e-comuns/

    But if I put these directives I get the .vhost.err
    ProxyPass /camlcursos http://www.medicina.ulisboa.pt/ensi...ico-de-medicina-de-lisboa-phdcaml/introducao/
    ProxyPassReverse /camlcursos http://www.medicina.ulisboa.pt/ensi...ico-de-medicina-de-lisboa-phdcaml/introducao/

    What's strange here is that this works on my ISPConfig 3.0.4.3.

    I confess that I am far far way from mastering the apache mod_proxy syntax and probably I'm making a dumb mistake, but why this don't work, remains a mistery to me.

    Thanks once again for your time.

    Regards,
    Vilhena
     
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    A vhost.err means that apache rejected the configuration that you have added. If there would be a length limitation in ispconfig, then you would not even be able to save the configuration.

    Rename the .vhost file to .vhost.bak, then rename the .vhost.err file to .vhost and then restart apache with the rejected configuration to see the error on the shell.
     
  16. orasis

    orasis Member

    Somewhere something gets limited, I haven't checked where, but I know that without altering any core files or db tables if I put enough stuff there it will get cut, maybe not in the ISPConfig3 fields themselves, but in the vhost files as I've seen it with my eyes. So why it happens I don't know thats why I opened this topic. Is debian responsible ? I dunno.
     
  17. vilhena

    vilhena New Member

    I've done what @till said, and I've found the error. Apparently this version of apache (2.4.6 ) has a bug in ProxyPass worker: https://bz.apache.org/bugzilla/show_bug.cgi?id=53218
    In version 2.2.15 this does not occur.

    I've tried the rewriterule alternative and apparently works. In the above example:
    ProxyPassReverse /camlcursos http://www.medicina.ulisboa.pt/ensi...ico-de-medicina-de-lisboa-phdcaml/introducao/
    it can be changed to:

    RewriteEngine On
    RewriteRule ^/camlcursos(.*) http://www.medicina.ulisboa.pt/ensi...o-de-medicina-de-lisboa-phdcaml/introducao/$1 [P]
    Thanks for your help
     

Share This Page