1

I have been trying all day to get Laravel up on a Virtual Server that is being served by 1&1 Hosting. The thing is, I am terrible at Command Line tasks but wanted to take on the challenge for educational purposes.

What I did was transfer my entire folder where laravel lived on my localhost (where it worked perfectly) into my virtual server. After doing that, when I goto http://myip/myproject ...all I get is:

This page isn’t working

myip is currently unable to handle this request.
HTTP ERROR 500 

However, before I was getting a 404 error so I know something happened. I am not exactly sure why this is happening and for some reason I am unable to access the error log. One thing I can provide however is that I tried to run php artisan dump-autoload and got the following error:

[Symfony\Component\Console\Exception\CommandNotFoundException]  
  Command "dump-autoload" is not defined.

I can also access folders like the app folder without problem which would not have been possible on my localhost

Shawn31313
  • 5,978
  • 4
  • 38
  • 80
  • 1. It's `composer dump-autoload`, not `php artisan dump-autoload`. 2. Which error log are you unable to access and why? 3. Have you configured the permissions for the `storage` and `bootstrap` directories? – fubar Aug 11 '17 at 02:32
  • Thank you. I am unable to access the laravel.logs. I also have not configured any permission because I had no idea I needed to do that. – Shawn31313 Aug 11 '17 at 02:35
  • I'd suggest you follow the [installation instructions](https://laravel.com/docs/5.4) so that everything Laravel is as it should be and then report back with where you're at afterwards. Although explaining to someone how to configure a LAMP server over SO comments may not be a realistic task. – fubar Aug 11 '17 at 02:38
  • [https://stackoverflow.com/questions/30639174/file-permissions-for-laravel-5-and-others][1] refer this and you will be fine – Harshavardhan Aug 11 '17 at 04:46

1 Answers1

0

Here is a quick list to successfully install laravel!

  • [ ] Point you document root to your public folder
  • [ ] Install composer on server
  • [ ] sudo apt-get install php7.0-mbstring
  • [ ] sudo apt-get install php7.0-zip
  • [ ] sudo apt-get install php-xml
  • [ ] sudo apt-get install php-curl
  • [ ] a2enmod rewrite (Enable apache mod rewrite, if using apache)
  • [ ] Give writting permissions on Storage and Bootstrap folder
  • [ ] run composer install on your project folder
  • [ ] run your migrations and change the .env to connect to database
  • [ ] service apache2 restart

And remember that the command is composer dump-autoload.

  • I did everything on there besides giving writing permissions on Storage and Bootstrap folders, how do I do that exactly? – Shawn31313 Aug 11 '17 at 02:48
  • you need to access your server through SSH and run the following commands: sudo chmod -R 775 /path/to/laravel/bootstrap sudo chmod -R 775 /path/to/laravel/storage One at a time – Guilherme Assemany Aug 11 '17 at 02:58
  • if it does not work, try setting 777. It is not secure, but you should test just to check if the problem is really the permission. – Guilherme Assemany Aug 11 '17 at 03:05
  • So far my solution has been to start with a fresh copy of laravel. But as soon as I replace my app folder things stop working. I will have to break it down and replace things slowly – Shawn31313 Aug 11 '17 at 03:34