I'm new to Linux and PHP and I'm trying to access a Laravel app from another device. Server is running a Centos and it's IP is 192.168.1.250 and my Laravel directory is /var/www/html/vls. At first it was showing directory listing when I wen to 192.168.1.250/vls in my browser. After some search I added these lines to httpd.con:
<Directory /var/www/html/vls>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<VirtualHost *:80>
DocumentRoot "/var/www/html/vls/public"
ServerName vls.dev
<Directory /var/www/html/vls/>
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
Now when I go to 192.168.1.250/vls it shows index.php content as text in browser.
I even followed the solution described here: How to stop laravel directory browsing
But then it showed directory listing of /public directory.
Any help is appreciated in advance.
EDIT: If I make a directory and place an index.php code that includes some PHP code it works fine. But Laravel app doesn't work and shows index.php code on the browser.