I am new to slim framework. Currently on my existing webserver which is on centos 7 I have other php based application running. So currently my directory structure is like this.
var/www/html
phpapp1
phpapp2
apislim
The folder for the apislim I created was for slim framework.
Below are the exact steps I did was
1. composer create-project slim/slim-skeleton
2. I rename the slim-skeleton folder to apislim
3. I make sure the owner is apache chown -R apache:apache apislim
4. In the httpd.conf I ensure this AllowOverride is enabled to be All
<Directory "/var/www">
AllowOverride All
# Allow open access:
Require all granted
Options -Indexes
</Directory>
Also below I enabled All
<Directory "/var/www/html">
Options -Indexes -FollowSymLinks
AllowOverride All
</Directory>
In the apislim/public folder I have this .htaccess file as below.
RewriteEngine On
RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.)::\2$ RewriteRule ^(.) - [E=BASE:%1]
RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ %{ENV:BASE}index.php [QSA,L]
The I have also the index.php file in the public folder which also links up to the src for the routes and the main folder apislim I created another .htaccess file and added this.
RewriteEngine on RewriteRule ^$ public/ [L] RewriteRule (.*) public/$1 [L]
The issue now I want my existing application to work along with this rest api which is based on slim framework. So when I go to this link
http://*.*.*.*/apislim/
http://*.*.*.*/apislim/public/
http://*.*.*.*/apislim/public/index.php
Neither of it works all are giving me 403 forbidden. Then I check the error log it show error regarding FollowSymLinks So I added Options -Indexes +FollowSymLinks Into
So next error I get now is 500 interval server error.