VHost config on ispConfig and App-Activation

Hi all,
I am running the current stable release of NC 12.0.3 on a debian server with ispConfig as a hosting platform.

The problem I am facing seems to be known but I have not see this specific analysis.

When trying to activate or deactivate an app via the web-interface an error is shown or nothing happens at all. Upon page reload the config has not changed.


  • Debian Jessie
  • NC 12.0.3
  • ispConfig 3.1.7
  • nginx 1.12.2


  • The request to enable or disable the app returns a 404. index.php/settings/ajax/enableapp.php
  • ispConfig outputs this block in the vhost file by default: location ~ \.php$ {}
  • NC config [1] adds this later on: location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+)\.php(?:$|/) {}
  • The first block takes precedence over the second one which breaks the initial request. A change of the order fixes the issue. But this cannot be done systematically but only with a manual edit of the vhost file.
  • Similar discussion has already taken place at ispConfig. [2]

I think this problem should be adressed by adjusting the NC configuration and not by editing the vhost templates. I tried fixing the NC config by hand but have not have any success.

Can anyone point me to info on how to adjust the second block in order for it to take precedence over the first one?

Relevant links:

This seems to a known an much discussed issue at ispConfig.

https://www.howtoforge.de/forum/threads/ispconfig-3-owncloud-5-0-nginx.6828/page-2#post-47077 (german)

This seems to do the trick for me though I have to idea if it breaks something else.

     location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.*)$;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_param HTTPS on;
        fastcgi_param modHeadersAvailable true; #Avoid sending the security headers twice
        fastcgi_param front_controller_active true;
        #fastcgi_pass php-handler;
#fastcgi_pass unix:/var/run/hhvm/hhvm.sock;
        fastcgi_intercept_errors on;
        fastcgi_request_buffering off;

        location @php {