问题
I've set up my Raspberry Pi 2 with a nginx, php, mysql environment and installed cakePHP with composer.
Now the cakePHP landing page looks weird. I'm assuming that this issue is related to my nginx vhost configuration. (Conf with vhost works, CSS files loading)
The question is: is it possible to use cake without vhost conf?
The route is set to the respective folder:
$routes->connect('/test/', ['controller' => 'Pages', 'action' => 'display', 'home']);
With best regards,
Phil
回答1:
Solved the problem by adding these lines into my /etc/nginx/sites-enabled/default conf-file:
location /test/ {
alias /usr/share/nginx/www/test/webroot/;
}
来源:https://stackoverflow.com/questions/30040999/cakephp-without-domain-name