Moving Yii Framwork site to amazon ec2

So i zipped up my site and my database and followed the instructions. stock is the name of my unzipped file. My site is stored here /var/www/html/stock. When I go to my IP i get this error: CException

Application runtime path "/var/www/html/stock/protected/runtime" is not valid. Please make sure it is a directory writable by the Web server process.

I have already run chown on my yii framework and my stock directory so all my files are 755. I am not too sure what to do next to fix this issue.

When I go to IP/stock i get the error. Does it matter than all my files are stored in stock and not in html?

Currently the DNS record is not pointing to my new IP but that shouldnt matter right? The homepage should at least show up?

Does the "runtime" directory exist?

yes it does.

You either need to make the webserver process the owner of the directory or go for 777.

All my permissions are set correctly. Now I am getting a new error. 404 error. 52.24.211.104 It is not loading any of the content even though the database is set up correctly. For some reason it is loading the header and the footer. I have not touched any of the settings but i know the Database configuration is in protected/config/main.php:

‘db’=>array(

                    'connectionString' => 'mysql:host=.........;dbname=databasename',


                    'emulatePrepare' => true,


                    'username' => '',


                    'password' => '',


                    'charset' => 'utf8',

This info is filled in correctly and then it is called by :

‘authManager’=>array(

                    'class'=>'CDbAuthManager',


                    'connectionID'=>'db',

So I feel like the database isn’t the issue but I am not too sure what else to do here. I have everything set up on amazon on a Amazon Linux AMI . I read somewhere that one person was having the same issue and made an Ubuntu instance instead if a linux and it worked for him. Could this possibly be the issue?

If it’s loading the header and the footer then it’s not a 404. What exactly is the error?

If you go to the IP i listed it does show a 404 error in the middle of the page in between the header and the footer.

OOPS! NOT FOUND!

404 Error. Apologies, but we were unable to find what you were looking for.

I feel like everything is set up. Unfortunately, I am just not familiar with the Yii framework at all. I was hoping that this move over to amazon would have been much smoother lol.