Seeker1337
6 months ago
667
3
Laravel

Laravel 6+ VPS hosting files structure problems

Posted 6 months ago by Seeker1337

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:

  1. 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 sign in or create an account to participate in this conversation.