![]() |
Can't access my website through localhost - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Installation & Setup (https://forum.codeigniter.com/forumdisplay.php?fid=9) +--- Thread: Can't access my website through localhost (/showthread.php?tid=89330) |
Can't access my website through localhost - Mustungun - 02-06-2024 Good morning! I'm trying to work on a new website with a colleague of mine using CodeIgniter4, but we found some issues. My colleague, who deployed the basis of the website recently, uses MacOS and accesses the website through MAMP. No problems on his side. I use Windows 10 and I access the website with the 'php spark serve' command (but I still use MAMP to access the DB). As I try to access localhost:8080, PowerShell displays the following error message: Code: PHP 8.1.0 Development Server (http://localhost:8080) started Line 47 of rewrite.php is what follows: Code: require_once $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . 'index.php'; Our obvious conclusion is that DOCUMENT_ROOT includes the 'public' folder (where index.php is indeed located) in his machine, but it's not included in my machine! What we setup so far: App.php Code: public string $baseURL = 'http://localhost:8080/'; .env Code: app.baseURL = 'http://localhost:8080/' MAMP/bin/apache/conf/extra/httpd-vhosts.conf Code: <VirtualHost *:80> And finally, our desperation maneuver, on an .htaccess file we created on the root of the project Code: <IfModule mod_rewrite.c> We also tried to check for potential problems on my machine by making a test website following the CodeIgniter4 guide, but no problems there! What could it be? We are striving for answers! Until then, we thank you all in advance! |