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

selyounsi's avatar

Issue with Index Route After Deploying Laravel 10 + Vue 3 SPA to VPS

Hi there,

I'm currently working on an SPA project using Laravel 10, Vue 3, and Vite. Everything worked perfectly in my local environment, but after deploying the project to my VPS with Plesk, I'm encountering some issues.

The problem is specifically with the index route:

When I access the domain directly (e.g., mydomain.com), I get a 500 error, but there are no detailed error messages. However, when I access other routes like mydomain.com/login, everything works just fine. Here’s my current setup:

public\index.php

public.htaccess

<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

routes\web.php

<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider and all of them will
| be assigned to the "web" middleware group. Make something great!
|
*/

Route::get('{any?}', function () {
    return view('app');
})->where('any', '.*');

Does anyone have any ideas on what could be causing this issue?

Thank you!

0 likes
4 replies
jlrdw's avatar

Have you tried mydomain.com/

selyounsi's avatar

@jlrdw

i have already tried with ‘mydomain.com’ and ‘mydomain.com/’ only the index route does not work, if i call other routes like ‘mydomain.com/login’ or ‘mydomain.com/dashbaord’ it works

JussiMannisto's avatar

I get a 500 error, but there are no detailed error messages.

What does the storage/logs/laravel.log file show? If it's empty, it means Laravel doesn't get booted up and you need to check the web server logs instead.

selyounsi's avatar

@JussiMannisto

So I don't get any logs from the file, I looked again under log and the following is displayed when I call the domain without a path:

500 GET / HTTP/1.0 SSL/TLS access for Apache


283914/T30 age/Cor/App/Implementation.cpp:221: Could not spawn process for application /var/www/vhosts/{domain}/httpdocs: The application process exited prematurely. Error ID: 84049eec Error details saved to: /tmp/passenger-error-G3cPEL.html

Node.js


When I try to open the file, I am told that the file does not exist.

So as I said this only happens if I specify the domain without path something like /login or /dashbaord and the application runs great also the whole API calls via Laravel

Please or to participate in this conversation.