Cannot serve site from localhost subfolder using spark? |
I've placed a CI website in a subfolder on my localhost (/Applications/MAMP/htdocs/website). From the root of the folder I run:
Code: $ php serve spark --port 8081 Code: CodeIgniter CLI Tool - Version 4.0.4 - Server-Time: 2021-10-11 08:18:10am But http://localhost:8081 throws an Internal Server Error (500) ... I've tried to modify the .htaccess from suggestions around the web without any luck (yeah, sad it should take luck to fix stuff like this). Does anyone have any idea what could be the cause for this? NOTE: I can run it through MAMP when going to http://localhost/website ... but I wanna switch to spark for local development.
the short answer is that spark serve would be for playing from say your Desktop when perhaps you might be using sqlite database which doesn't require a database daemon
So one approach where you have several directories inside the main web server directory would be to use virtual host; you have to configure so its listening to public i'm using apache where web root is at : /srv/http i've several web apps ,all contained within their own subdirectories. By proper set up I can get to individual landing page of each using slightly different addresses such as : http://127.0.0.2/ So basically just use the web server to serve not spark |
Welcome Guest, Not a member yet? Register Sign In |