Can't get Laravel welcome page to show
My server is on the DigitalOcean cloud. I am using Ubuntu with Apache web server. My home computer is running Windows 7. I use putty for the terminal.
Follow all directions https://laracasts.com/series/laravel-5-fundamentals/episodes/1 . Made it before 8:40, where it directs you to launch php -S localhost:8888 -t public
. I ran this, then open a web browser and tried this:
- 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 works.
In Google Chrome, the first two options where I list the port number, I get a page with a message This webpage is not available. ERR_CONNECTION_REFUSED.
In IE, I just get a page with a big font saying "This page cannot be rendered".
For the last two parameters, 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 am trying to find a web application framework to expand my php skillset. Can anyone help me? What am I doing wrong / missing video tutorial that I have to do in order to get Laravel up and running?
source to share
php -S localhost:8888 -t public
is designed to run the site locally, which is what the video shows.
If you are using Digital Ocean Drops with Ubuntu and Apache, you will need to configure Apache to use / public as your document root and install Laravel in the / var / www directory.
From there, you can visit the blob IP ( http://XXX.XXX.XXX.XXX
) instead of the domain name (if you haven't configured DNS for that domain name). You also don't need a port in the url as Apache will serve it on port 80 by default.
source to share
This is probably not the answer you want, but my advice here is based on setting up multiple VPSs on Digital Ocean. Step back. Spin a new VPS. Keep your old one if you like, but start over.
- Create a new blob
- Configure your SSH and PuTTY and make sure it works
- Install your FTP (if you are using it)
- DNS setup
- Install Apache config files. DO has a very good guide on this matter: https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mysql-php-lamp-stack-on-ubuntu-14-04
- Now work to get your "Hello World" page to display when you access your domain www.yourdomain.com, yourdomian.com. Don't fix the ports for now, just start a minimal server. This might help as well: https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts
- Make a saved "image" of this basic working setup so you can use the new VPS if you need to.
- Now that you have a server that is loading the domain index page, you can start installing your Laravel.
In a nutshell, I would advise you to build a stable working server platform before trying to install and run more complex technologies like Laravel, Rails, etc.
Tutorials often make complex technologies seem easy, 10 minute expert, but there is a tremendous complexity hidden under the hood of these frameworks. Start simple and build on the server one at a time. You must walk before you run.
source to share
I use Laravel a lot, but my experience with servers is more relevant here. Everything you said indicates an access issue, and knowing how the hosting companies work, this port is probably blocked (along with all other non-standard ports).
You can check this with PuTTY, open it and enter your server hostname. Change the port to 80 and change the closing on the window exit to never, then connect. Enter:
GET / HTTP/1.1
Host: yourwebsite.com
Then click twice and the server will process the result. It should show you the HTML address of your home page.
Now try again with port 8888 and see if you can even connect. If you can connect, this is not a port issue, but I am assuming you get a fatal error Network error: Connection refused
, which means the port is closed or blocked through a firewall.
Even though DigitalOcean gives you complete control over the server, the connection is likely still going through their firewall. You may have your own firewall, but otherwise, if the server is running through its own firewall and the port is blocked, there is nothing you can do on the server, open that port.
source to share