无法获得Laravel欢迎页面显示 [英] Cannot Get Laravel Welcome Page to Show

查看:261
本文介绍了无法获得Laravel欢迎页面显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的服务器在DigitalOcean云上.我正在将Ubuntu与Apache Web服务器一起使用.我的家用计算机正在运行Windows7.我正在使用腻子作为终端.

按照 https://laracasts.com/series/上的所有说明进行操作laravel-5-fundamentals/episodes/1 .达到8:40,它会指导您运行php -S localhost:8888 -t public.我运行它,然后打开Web浏览器并尝试了以下操作:

- http://mywebsite.com:8888
- http://www.mywebsite.com:8888
- http://mywebsite.com/learning-laravel-5/public
- 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用于在本地运行网站,这就是视频所显示的内容.

如果要在Ubuntu和Apache上使用Digital Ocean Droplet,则需要将Apache配置为使用/public作为文档根目录,并在/var/www目录中安装Laravel.

从那里您可以访问Droplet的IP地址(http://XXX.XXX.XXX.XXX)而不是域名(除非您已为该域名配置了DNS).您也不需要URL中的端口,因为Apache将在默认端口80上提供该端口.

My server is on DigitalOcean cloud. I am using Ubuntu with Apache web server. My home computer is running Windows 7. I am using putty for terminal.

Followed all of the directions on https://laracasts.com/series/laravel-5-fundamentals/episodes/1. Made it up to 8:40, where it directs you to run php -S localhost:8888 -t public. I run that, then open a web browser and tried the following:

-http://mywebsite.com:8888
-http://www.mywebsite.com:8888
-http://mywebsite.com/learning-laravel-5/public
-http://mywebsite.com/learning-laravel-5/public/index.php

None of the above work.

In Google Chrome, the first two options where I list the port number, I get a page saying This webpage is not available. ERR_CONNECTION_REFUSED. In IE, I just get a page with big font saying "This page can't be displayed."

For the last two options, I just get a completely blank page. In the console, I get this error: Failed to load resource: the server responded with a status of 500 (Internal Server Error).

I'm trying to pick up a web app framework to broaden my php skill set. Can someone help me out? What am I doing wrong/what is the video tutorial missing that I have to do in order to get Laravel up and running?

解决方案

php -S localhost:8888 -t public is meant for running a site locally, which is what the video is showing.

If you are using a Digital Ocean droplet with Ubuntu and Apache, you will need to configure Apache to use /public as the document root and have Laravel installed in the /var/www directory.

From there you can visit the droplet's IP address (http://XXX.XXX.XXX.XXX) instead of the domain name (unless you have configured the DNS for that domain name). You won't need the port in the URL either, since Apache will be serving it on the default port 80.

这篇关于无法获得Laravel欢迎页面显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆