Monday, March 14, 2022

[SOLVED] How to run laravel in root directory without the public folder?

Issue

I am running the latest version of laravel on my own server running Debian and Apache2.

The contents of laravel are located in /var/www which is what my domain name is pointed to however all of the functionality happens through the public directory so I would have to go to http://mydomain.com/public to access anything.

I would like to change it so that I only have to access http://mydomain.com. Is this possible?

How can I change this? Would I have to move everything up another level to the parent at /var?

I haven't found anything online so far that says that it is possible, or that it is a good idea.


Solution

That is not your problem, you need to point the virtual host to the public folder.



Answered By - wesside
Answer Checked By - David Goodson (WPSolving Volunteer)