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

kshorne's avatar

Deploying to Shared multi-domain server no SSH

Hi guys, currently trying to deploy a laravel 5 site to a shared server that has multi domains on it and the server manager cant seem to enable SSH. I was going to symlink the public directory but thats not currently an option. So example.com.au goes to home/user/public_html/example.com.au as document root. My plan is to have my app in home/user/app and public in home/user/public_html/example.com.au. Currently all im getting is 'Whoops, looks like something went wrong' - 2 instances in fact - Debug=True. Any ideas? Relavent files that i know of as follows, am i missing something? Anyone know any reasons why id get that error and no debug. Ive set it up locally exaclty the same and get the same result.

AppServiceProvider.php

    {
        $this->app->bind('path.public_html.example.com.au', function() { return DIR; });
    }

index.php

require '../../bootstrap/autoload.php'; $app = require_once '../../bootstrap/app.php';

.htaccess - i dont know what im doing here

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

    RewriteEngine On

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

    # Handle Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]

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

EDIT: Accidentally left in real website info so took it out

2nd EDIT: It might be worth mention ive deployed another laravel site on another server; again without SSH and shared hosting however it wasnt multi domain and everything worked fine with above changes.

3rd EDIT: ive managed to get it to a point where the index will load the first view and then all routes there after wont work just get 404, so im guessing its an htaccess thing? anyone with some knowledge help me out?

0 likes
0 replies

Please or to participate in this conversation.