我有一个laravel应用程序,我的客户端需要通过子文件夹(比如clientdomain.com/laravelapp/)访问它。我已经将laravel的/public/文件夹中的内容移到了/laravelapp,并设置了index.php文件,以便它引用正确的路径。
我最终得到了以下结构:
- /public_html (webroot of the server)
- /myapp/ (this is the public folder that was inside the laravel project)
- /laravel-framework (this is the laravel project folder with controllers, views, vendors, etc)
当我访问主路由(clientdomain.com/laravelapp)时,它工作正常,它显示视图、图像和一切正常。问题是当我尝试访问不同的路由时,它显示404。
我不能手动设置nginx conf文件,但是ISPConfig有一个用于nginx指令的框。
对于像我这样的设置,正确的指令是什么?
我要提前谢谢你。
发布于 2018-08-31 06:46:09
尝试将其添加到nginx指令的框中。
location / {
try_files $uri $uri/ /index.php?$args;
}
https://stackoverflow.com/questions/52105786
复制相似问题