I tried to make a yii project for testing by executing
/var/www/html/yii/framework/yiic webapp demo
and when I go to localhost/demo I get en er
Changed access of the entire folder of the site by using the following command
sudo chmod -R 777 'name of your website folder'
This will solve the issue.