dra87370 2015-01-16 14:23 采纳率: 100%
浏览 10

Laravel项目在主机服务器上

I try to deploy my laravel project on host server. So I upload all files contains in my Laravel Project folder on my host server. But when I check with the url, I can't use my project like when I'm on my localhost. I have just the homepage and when I tried to access others pages the server return 404 not found.

I really have no idea what I should do ?

Any suggests, thanks !

  • 写回答

2条回答 默认 最新

  • douyan6871 2015-01-16 14:27
    关注

    There are several things to check while you work to resolve this issue:

    Compatible Environments

    If your host uses web server software (Apache, Nginx, etc) other than the one that you use in your development environment, check the Laravel documentation for information about configuration Laravel to run with your hosts's web server.

    Routing

    Ensure that you deployed your .htaccess file. This file lives in the public directory. It is responsible for mapping all of your URLs to the main Laravel router.

    Deployed Files

    Verify that all of your other files on the host server match the files in your development environment. It is not uncommon to miss files or entire directories when deploying a new project.

    Logging

    If your problem still is not resolved, get access to the host's log files and examine the errors that are logged when you try to access your site. You can often find a clue in the log files that will lead you to the specific problem.

    评论

报告相同问题?

悬赏问题

  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?
  • ¥20 怎么用dlib库的算法识别小麦病虫害
  • ¥15 华为ensp模拟器中S5700交换机在配置过程中老是反复重启
  • ¥15 java写代码遇到问题,求帮助
  • ¥15 uniapp uview http 如何实现统一的请求异常信息提示?
  • ¥15 有了解d3和topogram.js库的吗?有偿请教
  • ¥100 任意维数的K均值聚类
  • ¥15 stamps做sbas-insar,时序沉降图怎么画
  • ¥15 买了个传感器,根据商家发的代码和步骤使用但是代码报错了不会改,有没有人可以看看
  • ¥15 关于#Java#的问题,如何解决?