Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

henryCoding's avatar

Deploying to Laravel Forge -- Error and completeyl stuck

Hi everyone.

I developed a site using Laravel. VueJS and inertia. It worked completely, perfectly fine when I was developing with laravel herd:

I'd spin up the dev site using npm run dev, open it up (sitename.test), and would work away.

Okay cool-- now let's deploy it I thought!

I've never deployed anything, so I researched, and found laravel forge. I made an account, got a server with vultr running, and connected it to laravel herd via the integration.

So, I go to sites, click on the site I was happily working on with no problems, and hit connect provider.

Cool. No problem there. I click on the forge site on the sidebar, and see that the preview is just an empty white screen. Weird.

Well, I copy and paste the public ip into my browser and.... "500 | Server Error". I've spent the last 4 hours trying to figure this out and have not the slightest clue what to do.

Would appreciate any help-- I know this is vague with zero error logs, but I genuinely do not know where to even start!

0 likes
3 replies
LaryAI's avatar
Level 58

Deploying a Laravel application to a server like Laravel Forge can sometimes be tricky, especially if you're new to deployment. Here are some steps you can take to troubleshoot and resolve the "500 | Server Error" issue:

  1. Check the Laravel Logs:

    • The first step is to check the Laravel logs for any errors. You can find these logs in the storage/logs directory of your Laravel application. Look for the laravel.log file and check for any error messages that might give you a clue about what's going wrong.
    tail -f storage/logs/laravel.log
    
  2. Check Server Logs:

    • In addition to Laravel logs, check the server logs for any errors. These logs are usually located in /var/log/nginx/error.log or /var/log/apache2/error.log depending on your web server.
    tail -f /var/log/nginx/error.log
    
  3. Environment Configuration:

    • Ensure that your .env file is correctly configured on the server. Common issues include incorrect database credentials or missing environment variables. Make sure the APP_ENV is set to production and APP_DEBUG is set to false for a production environment.
  4. File Permissions:

    • Ensure that the storage and bootstrap/cache directories have the correct permissions. They should be writable by the web server.
    sudo chown -R www-data:www-data storage bootstrap/cache
    sudo chmod -R 775 storage bootstrap/cache
    
  5. Composer Dependencies:

    • Ensure that all composer dependencies are installed. Run composer install --optimize-autoloader --no-dev on the server to install production dependencies.
    composer install --optimize-autoloader --no-dev
    
  6. Build Frontend Assets:

    • Since you're using VueJS and Inertia, make sure to build your frontend assets. Run npm run production to compile your assets for production.
    npm install
    npm run production
    
  7. Clear Caches:

    • Clear any cached configurations, routes, and views to ensure that the latest changes are being used.
    php artisan config:cache
    php artisan route:cache
    php artisan view:cache
    
  8. Check .htaccess or Nginx Configuration:

    • If you're using Apache, ensure that the .htaccess file is correctly configured. For Nginx, ensure that the server block is correctly set up to point to the public directory of your Laravel application.
  9. Database Migrations:

    • Ensure that your database is up to date by running migrations.
    php artisan migrate --force
    
  10. SSL and Domain Configuration:

    • If you're using a domain, ensure that your DNS settings are correctly pointing to your server's IP address. Also, check if SSL is configured correctly if you're using HTTPS.

By following these steps, you should be able to identify and resolve the issue causing the "500 | Server Error". If the problem persists, consider providing more specific error messages from the logs for further assistance.

henryCoding's avatar

A quick update: I managed to get into the larvael forge server and enable the app debug mode.

Here's the error it gives when i connect to the domain: Vite manifest not found at: /home/forge/(the domain)/public/build/manifest.json

Snapey's avatar

you need to do a production build as part of your deployment script

1 like

Please or to participate in this conversation.