I'm trying to upload my laravel project to a vps, obviously you think I'm an imbecile asking how to configure apache to deploy the app, but I get HTTP_ERROR 500 and I can not think of anything else to do, I have to say that I have previously managed to deploy another project in this same hosting.
I bought a vuntu from ubuntu 14.04 clean, I installed LAMP and I configured apache in sites-available, to generate a file.conf.
The strange thing is that even if you disable the sites-available / 000-default, copying the file and changing the path for the laravel project (just installed in / var / www / proyecto / public) there is no way to take the configuration
I have activated the rewrite module and put the host name in / etc / hosts
and it still does not work.
Any suggestions please? Edit: I have copied the configuration of my apache configuration file from another server where I have deployed a laravel project, and I have even uploaded that project to this vps, and I have not gotten it to work, I have even reinstalled everything from 0, I paste the content of the apache configuration file:
<VirtualHost *:80>
ServerName vps585365.ovh.net
ServerAdmin webmaster@localhost
DocumentRoot /var/www/api/public
<Directory /var/www/api/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<IfModule mod_dir.c>
DirectoryIndex index.php index.pl index.cgi index.html index.xhtml $
</IfModule>
Somebody could summarize me what files of apache or laravel you have to touch or modify so that everything works correctly, because I think I'm forgetting something ...
Is there a difference between debian and ubuntu? With respect to the apache configuration on the server. Edit2: index.php of my project:
<?php
require __DIR__.'/../bootstrap/autoload.php';
$app = require_once __DIR__.'/../bootstrap/app.php';
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
laravel.log:
[2018-09-24 15:06:52] production.ERROR: Symfony\Component\Console\Exception\CommandNotFoundException: Command "composer" is not defined. in /var/www/apigranja/vendor/symfony/console/Application.php:515
Stack trace:
#0 /var/www/apigranja/vendor/symfony/console/Application.php(183): Symfony\Component\Console\Application->find('composer')
#1 /var/www/apigranja/vendor/symfony/console/Application.php(117): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output$
#2 /var/www/apigranja/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(107): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Sym$
#3 /var/www/apigranja/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 {main}
Thank you very much in advance.
Greetings.