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

milest's avatar

Deployed - Internal ServerError - How to Debug?

I need help getting my Laravel app to run on a shared host.

The app is operates successfully on my development WAMP setup (PHP 5.6.25).

Deployment to the client's shared server did not work: A basic index page with a closure is OK - hits the database and returns records, but anything involving a route returns "500 Internal Server Error"

The domain is portfolio.eastportprop.com. The hosting company uses /public for web pages.

The basic index page I referred to above confirms the database connection is good.

I have no access to server logs, command line php, thus no Artisan or Composer.

The directory structure is as follows:

/
--public
--laravel

Everything except the .env file has been copied from the /laravel/public directory to /public.

All other project files remain in the /laravel directory. I did not delete /laravel/public.

Modifications to /public/index.php have been made as follows:

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

And to /laravel/server.php:

require_once __DIR__.'../public/index.php';

The .htaccess file is very simple: --- start of file ---

Options +FollowSymLinks
AddType image/jpeg .jpeg .jpg .jpe .JPG 
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

--- end of file ---

There is a .htpasswd file in /public leftover from a previous PHP Cake installation, the hosting company does not seem to consider it a problem.

The server is Apache 2 and the PHP version 5.6.30 with tokenizer, mcrypt, PDO, etc.

As noted above, with no command line PHP, I have not been able to run the Composer commands given in other deployment instructions to dump-autoload, config:cache and route:cache

Any suggestions or guidance will be welcomed - this is frustrating beyond belief - the server message follows my name.

Regards - Miles Thompson

Error message:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, or webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.
0 likes
1 reply
milest's avatar

The solution lay in the .htaccess file, adding this line:

RewriteBase /

Please or to participate in this conversation.