TheUnreal
TheUnreal

Reputation: 24472

Laravel returns error 500 after uploading to web host via FTP

I am trying to access my API and I get error 500 after uploading it to my FTP. Laravel located at: MYDOMAIN.COM/v2/api

no error logs are generated.

My public index.php is the default one. Tried to play with it, but the paths seem fine.

What could have gone wrong?

For the reminder, it is a different domain. I do edit the config/app.php

Upvotes: 2

Views: 272

Answers (1)

Dennis Adriaansen
Dennis Adriaansen

Reputation: 173

Some things i experienced:

  1. Run a composer install in case you moved your project. (I did this sometimes and skipped the vendor folder)
  2. Just give your storage folder the right permissions:
    chown -R www-data.www-data /var/www/laravel $ chmod -R 755 /var/www/laravel $ chmod -R 777 /var/www/laravel/app/storage assad
  3. Finally check your server settings. If your virtualhost has a wrong directory path the things above doesn't matter.

    ServerName laravel.example.com
    DocumentRoot /var/www/laravel/public

    <Directory />
            Options FollowSymLinks
            AllowOverride None
    </Directory>
    <Directory /var/www/laravel>
            AllowOverride All
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    LogLevel warn
    CustomLog ${APACHE_LOG_DIR}/access.log combined

Credit: http://tecadmin.net/install-laravel-framework-on-ubuntu/#

Upvotes: 1

Related Questions