Issue with Laravel or web server, sorry for the vague title


So, I am fairly inexperienced in matters Laravel. I had this setup for a few months and everything worked fine. It's a Bitnami Lampstack VM, version 7.1.12, I have installed composer and Laravel on top of that. I am accessing the dev folder with the main machine via sftp from a text editor, and the console via PuTTY. And this setup really works for me far better than homestead and all other options available.

So, the versions are: PHP 7.1.12, apache 2.4.29, composer 1.6, laravel 5.5.28

The problem for the apps created after the last laravel update is that I do get just the listing of a folder when I open the serverip/appname in a browser. When I try to open a route, serverip/appname/route, I am getting not found. But, when I type serverip/appname/public, I get to the Laravel default landing page, and when I type serverip/appname/public/route, I get to the desired route.

I am assuming that I messed something up, but I do not know what.

I found somewhere that if you get a directory listing instead of a php rendering, there is a problem with apache, but before I try to reconfigure the apache conf file, I'll rather ask you, maybe someone knows exactly what the problem may be.

Jef Mertens replied 1 week ago Solution

you can make a vhost in apache !

<VirtualHost *:80>

ServerName myapp.test

DocumentRoot "/path/to/folder/myapp/public"

<Directory "/path/to/folder/myapp/public">

AllowOverride all    
</Directory> </VirtualHost>

Then you make a entry in your host file :

127.0.0.1 myapp.test

this should do the trick !


Sign in to participate in this thread!


We'd like to thank these amazing companies for supporting us