Running a CakePHP site on Hestia

Hi all,

I have installed Hestia and have it all setup and then installed CakePHP but I keep getting error 500 for the cakephp site. I think its todo with how nginx handles the request. Can someone on here point me in the right direction so that I can get this working?

CakePHP is installed in /home/{{user}}/web/{{domain}}/public_html/app

And the document root for the site is set to app/webroot via Hestia Control Panel.
I have noticed that there are a number of configuration files in, /usr/local/hestia/data/templates/web/nginx/php-fpm, including for Drupal WordPress and others etc, and am wondering whether I would need to create a file there for cakephp (cakephp.tpl/stpl)

I have looked at the logs and found this: /home/{{user-replaced}}/web/{{domain-replaced}}/public_html/app/.htaccess: <IfModule not allowed here

Any help would much appreciated.


500 points probally in the issue .htaccess file please post the full contents



> <IfModule mod_headers.c>
>     RequestHeader unset Proxy
> </IfModule>
> <IfModule mod_rewrite.c>
>     RewriteEngine on
>     RewriteRule    ^(\.well-known/.*)$ $1 [L]
>     RewriteRule    ^$    webroot/    [L]
>     RewriteRule    (.*) webroot/$1    [L]
> </IfModule>

And, /app/webroot/.htaccess:

<IfModule mod_rewrite.c>
	RewriteEngine on
	RewriteBase /
	RewriteCond %{HTTPS} !=on
	RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301,NE]
	RewriteRule ^(Robots)\.txt robots.txt [L,R=301]

	RewriteCond %{REQUEST_FILENAME} !-f
	RewriteCond %{REQUEST_URI} !^/(webroot/)?(well-known|font|img|css|css-cache|files|js|js-cache|vendor|favicon.ico)/(.*)$
	RewriteRule ^ index.php [L]

Add mod headers module to apache2

Not enabled by default

Its enabled already. I have removed the .htaccess (/app/.htaccess) file and it works but that is not the way it is meant to work so am trying to figure out what is wrong. I also changed home/{{user}}/conf/web/{{domain}}/apache2.conf so that the webroot directory is as follows:

> <Directory /home/{{user}}/web/{{domain}}/public_html/app/webroot>
>         AllowOverride All
>         Options FollowSymLinks +Includes -Indexes +ExecCGI
>  </Directory>

But I think I will need to change it elsewhere so that it applies to all sites when they are created.

Would you happen to know where exactly would I need to make that change?

I am looking at


And it seems to be the placed where the change needs to be made?

Create new file from both default.tpl and default.stpl and rename it to cake.(s)tpl

Thanks. I will do that.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.