/服务器上的空白页输出索引

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

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>

You have to make sure about 3 points for this issue

1) Need .htacces file in /var/www/projectName/.htacces which is provided by codeignitor

2) Must have rewrite module emable. If you are using Ubuntu OS and apache2 then execute "sudo a2enmod rewrite" in your terminal for enable this.

3) Must allow override url by .htaccess rule in apache.conf for /var/wwww folder. If you are using Ubuntu OS and apache2 then edit file /etc/apache2/apache.conf. and change "Allowoverride none" to "Allowoverride All" in block/section of . and then restart apache by "sudo service apache2 restart" command