Debugging nginx directives

Discussion in 'Installation/Configuration' started by ItsDom, Jan 4, 2013.

  1. ItsDom

    ItsDom New Member


    I'm trying to get cakephp working with ISPConfig3 and nginx (loosely following

    I have the server setup fine (I can run phpinfo() and other snippets of php fine) but I can't get cake working. I think it's because cake out of the box relies on mod-rewrite, but by default it should still work out of the box, just look ugly. But it doesn't work at all, I just get 404's, I'm guessing because it's redirecting me somewhere the doesn't exist.

    But when I add nginx directives through the ISPC control panel, sometimes they don't get applied fully, but a mydomain.vhost.err shows up in /etc/nginx/sites-available. But there's absolutely no indication or documentation or log or anything anywhere I can find that explains this - am I missing something here?

    Is there a way to debug site-specific nginx directives? And also, might it be possible that future version of ISPC indicate there has been a problem applying directives in the control panel, rather than having to manually check /etc/nginx/sites-available?



    EDIT: I'm running ISPConfig 3.0.5RC1, nginx 1.3.7 and I've tried cakephp 2.2.5 and 2.3.0RC1
    Last edited: Jan 4, 2013
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You can see this alraedy in the current version, just switch log level from error to warning in systm > server config and you will get the warnings in the system log of the monitor in case that a config change can not be applied.

    For debugging instructions, please read the sticky post here in this forum.
  3. ItsDom

    ItsDom New Member

    Thanks, I didn't notice that.

    It says the root directive is duplicated, yet I only have it in there (the directives field) once. I'm guessing it's already in there once by default, but I need to be able to change it. Is it possible for users to change the root?

    at the moment its set to /srv/www/sausage.server/web and I need to change it to /srv/www/sausage.server/web/cake/app/webroot.
    If I make the change directly in the file, wont it just be overwritten the next time I update the directives field?
  4. falko

    falko Super Moderator ISPConfig Developer

    Put the root directive in a location container (e.g.

    location / {
    ), and it should work.

Share This Page