Yii Framework Forum: Moving Yii Framwork site to amazon ec2 - Yii Framework Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Moving Yii Framwork site to amazon ec2

#1 User is offline   balistrerin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 17-August 16

Posted 17 August 2016 - 02:36 PM

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?
0

#2 User is offline   Patrick Jones 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 14-July 12
  • Location:Berlin

Posted 17 August 2016 - 03:16 PM

Does the "runtime" directory exist?
Freelance developer for hire - send me a message!
0

#3 User is offline   balistrerin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 17-August 16

Posted 17 August 2016 - 03:59 PM

View PostPatrick Jones, on 17 August 2016 - 03:16 PM, said:

Does the "runtime" directory exist?


yes it does.
0

#4 User is offline   Patrick Jones 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 14-July 12
  • Location:Berlin

Posted 18 August 2016 - 04:26 AM

You either need to make the webserver process the owner of the directory or go for 777.
Freelance developer for hire - send me a message!
0

#5 User is offline   balistrerin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 17-August 16

Posted 18 August 2016 - 09:48 AM

View PostPatrick Jones, on 18 August 2016 - 04:26 AM, said:

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?
0

#6 User is offline   Patrick Jones 

  • Advanced Member
  • PipPipPip
  • Yii
  • Group: Members
  • Posts: 495
  • Joined: 14-July 12
  • Location:Berlin

Posted 18 August 2016 - 10:03 AM

If it's loading the header and the footer then it's not a 404. What exactly is the error?
Freelance developer for hire - send me a message!
0

#7 User is offline   balistrerin 

  • Newbie
  • Yii
  • Group: Members
  • Posts: 4
  • Joined: 17-August 16

Posted 18 August 2016 - 10:06 AM

View PostPatrick Jones, on 18 August 2016 - 10:03 AM, said:

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.
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users