Skip to content
Advertisement

Index of / with blank page output on server

I uploaded my PHP(codeigniter) project on server. But when I run it I get below window

Index of /

Name    Last modified   Size    Description
Apache Server at 'ip address here' Port 80

project folder is in /var/www/

DocumentRoot is set in projectName.conf directory as /var/www/projectName

Advertisement

Answer

Make sure your site .conf points to the public folder and not the site root.

<VirtualHost *:80>
        ServerName site.co.uk
        DocumentRoot /var/www/site.co.uk/public

        <Directory "/var/www/site.co.uk/">
                Options -Indexes +FollowSymLinks
                Order allow,deny
                Allow from all
                AllowOverride FileInfo All
                Require all granted
        </Directory>
</VirtualHost>
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement