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?

+3


source to share


4 answers


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.

+2


source


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.




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.

+1


source


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.

0


source


Have you tried it chmod -R 0777 storage

?

-1


source







All Articles