Laravel 5.2 installation in Droplet LAMP-Ubuntu 18.04

March 15, 2019 571 views
LAMP Stack PHP Frameworks Apache Ubuntu 18.04

I create a Droplet LAMP-Ubuntu 18.04 to use a Laravel project. Use git clone to past my project and all basic installation, composer install, etc, But when try go to the url Ex: "104.12.26.03/mainsystem/public" show this error NotFoundHttpException in RouteCollection.php line 161:

My virtualhost are

<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/mainsystem/public
<Directory /var/www/html/mainsystem/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
Require all granted
</Directory>
ErrorLog ${APACHELOGDIR}/error.log
CustomLog ${APACHELOGDIR}/access.log combined
</VirtualHost>

Also if I change the DocumentRoot /var/www/html/mainsystem/public to DocumentRoot /var/www/html

I can view th login page but when I try log in, show me the error "is currently unable to handle this request.
HTTP ERROR 500"

I have the project working in other server, I think that is something with the OceanDigital LAMP installation but I dont konw what it is? If anyone know what can be the problem, really I will stay grateful

1 Answer

Greetings!

It may be difficult to say. If your application or it's interpreter can be set to output debug logs, this may reveal more information about what is occurring. There's nothing particularly special about our LAMP server, it may just be something you need installed that isn't, or even an environment variable.

What I did notice, and you'd be able to tell me more if this is relevant to you, was that you called /mainsystem/public but also set the document root to /var/www/html/mainsystem/public. If we're not looking at a reverse proxy scenario or anything like that, which doesn't seem to be the case here, then we should be able to accurately say that your URL actually called the physical directory "/var/www/html/mainsystem/public/mainsystem/public" because it was added on in addition to the document root (which would be called directly by visiting the IP with no data after a trailing slash).

Jarland

Have another answer? Share your knowledge.