我的服务器位于 DigitalOcean 云上。我正在使用 Ubuntu 和 Apache Web 服务器。我的家用计算机运行的是 Windows 7。我使用 putty 作为终端。
遵循所有指示https://laracasts.com/series/laravel-5-fundamentals/episodes/1 https://laracasts.com/series/laravel-5-fundamentals/episodes/1。直到 8 点 40 分,它会指示你跑步php -S localhost:8888 -t public
。我运行它,然后打开网络浏览器并尝试以下操作:
-http://mywebsite.com:8888 http://mywebsite.com:8888
-http://www.mywebsite.com:8888 http://www.mywebsite.com:8888
-http://mywebsite.com/learning-laravel-5/public http://mywebsite.com/learning-laravel-5/public
-http://mywebsite.com/learning-laravel-5/public/index.php http://mywebsite.com/learning-laravel-5/public/index.php
以上都不起作用。
在 Google Chrome 中,我列出端口号的前两个选项,我得到一个页面说This webpage is not available. ERR_CONNECTION_REFUSED.
在 IE 中,我只得到一个大字体的页面,上面写着“此页面无法显示”。
对于最后两个选项,我只得到一个完全空白的页面。在控制台中,我收到此错误:Failed to load resource: the server responded with a status of 500 (Internal Server Error)
.
我正在尝试选择一个 Web 应用程序框架来扩展我的 php 技能。有人可以帮我吗?我做错了什么/为了让 Laravel 启动并运行我必须执行哪些视频教程?
php -S localhost:8888 -t public
用于在本地运行网站,这就是视频所显示的内容。
如果您将 Digital Ocean Droplet 与 Ubuntu 和 Apache 结合使用,则需要将 Apache 配置为使用 /public 作为文档根目录,并将 Laravel 安装在 /var/www 目录中。
从那里您可以访问 Droplet 的 IP 地址(http://XXX.XXX.XXX.XXX
) 而不是域名(除非您已为该域名配置了 DNS)。您也不需要 URL 中的端口,因为 Apache 将在默认端口 80 上提供服务。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)