You just need to point to look for index.php within /var/www/html/my-project/public, right?
Laravel 6+ VPS hosting files structure problems
Hello. I've recently uploaded my website to a VPS ( Ubuntu 18.04 with Webmin/Virtualmin/LAMP - Apache ) but I ran into a few issues:
- Everything is set up as it should be but I'm having an issue with the files hierarchy. Here is how it looks at the moment:
/var/www/html/my-project/public
Inside --- /var/www/html --- there is a index.php file that gets rendered first and here is the code inside that index.php
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title></title>
<meta name="description" content="">
</head>
<?php
include('layouts.header')
include('layouts.middle')
include('layouts.middle2')
include('layouts.footer')
?>
</html>
Here I guess the problem is that this index.php is outside of 'my-project' and the 'PUBLIC' folder itself and it doesn't recognize my layouts' files. I've tried including the resources/views before the layouts but it still won't recognized. Basically, it's working because if I type a random text it gets displayed but I'm failing at the files hierarchy level. Any help is appreciated.
Please or to participate in this conversation.