cakePHP without domain name

こ雲淡風輕ζ 提交于 2019-12-12 06:13:55

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!