I have been looking to find a solution to this issue. It seems that for some reason I am getting a error 500 regardless what I do when I am installing CodeIgniter (php framework).
It is a fresh virtual host, the only thing that is installed on it are required packages from CodeIgniter.
Laravel works just fine out of the box, CodeIgniter however does not, anyone else experienced this?
I know for a fact that Options -Indexes is something that Apache2 is not a a valid config setting and will not allow apache to start propedly, i have tried this last night.
/public/.htaccess: Option All not allowed here
AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions
I had issues with custom coded routers such as alto router but that got fixed and never saw an issue again. I simply cannot twist my head around this one.
yes, the welcome splash page shows up since its a static page (as it is when ci4 is installed with composer)
however once few lines of code is written i get an error saying:
AH00670: Options FollowSymLinks and SymLinksIfOwnerMatch are both off, so the RewriteRule directive is also forbidden due to its similar ability to circumvent directory restrictions
Hi Paul
thanks for your effort and sorry for now my late reply.
I will take a look at it, it has been a hectic December here with this COVID so have not been able to test further…
I have a CI4 as far as you have so, as it is now looks fine. next part will be when CI4 needs to do some routing… (if someone should use CI4 as a frontend) for me CI4 will be used as a API
as @pixel_paul sugested everything can be done in .htaccess file. here is the complete and slightly modified .htaccess file:
# Disable directory browsing
# Options All -Indexes
# ----------------------------------------------------------------------
# Rewrite engine
# ----------------------------------------------------------------------
# Turning on the rewrite engine is necessary for the following rules and features.
# FollowSymLinks must be enabled for this to work.
<IfModule mod_rewrite.c>
Options +SymLinksIfOwnerMatch
RewriteEngine On
# If you installed CodeIgniter in a subfolder, you will need to
# change the following line to match the subfolder you need.
# http://httpd.apache.org/docs/current/mod/mod_rewrite.html#rewritebase
#RewriteBase "/"
# Redirect Trailing Slashes...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
# Rewrite "www.example.com -> example.com"
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^ http://%1%{REQUEST_URI} [R=301,L]
# Checks to see if the user is attempting to access a valid file,
# such as an image or css document, if this isn't true it sends the
# request to the front controller, index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^([\s\S]*)$ index.php/$1 [L,NC,QSA] (orginal line)
RewriteRule ^([\s\S]*)$ index.php?/$1 [L,NC,QSA]
# Ensure Authorization header is passed along
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
ErrorDocument 404 index.php
</IfModule>
# Disable server signature start
ServerSignature Off
# Disable server signature end
you need the index part aswell so you get the sessions transfered aswell ;). thanks for your help @pixel_paul