Yii 2 Advanced Setup Questions

Hi All,

I am new to Yii and installing the advanced template. I have some questions and highlighted them in bold if that’s ok.

For Clarity:

VPS Server, Ubuntu 14.04.

LAMP Installed.

phpMyAdmin Installed.

Composer Installed.

PHP version 5.5

Installation:

Using guide: http://www.yiiframework.com/doc-2.0/guide-tutorial-advanced-app.html

I have entered:

composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-advanced yii-application (in putty terminal).

This has installed to root. [See Pic1].

6003

Picture1.png

However, when I come to enter: php /path/to/yii-application/init in putty terminal.

I receive the following exception/error: Could not open input file: /path/to/yii-application/init

[b]Q1. Is this because apache is looking at /var/www/

Q2. If Q1 is "yes"; how do I change:

move yii to /var/www/

redirect apache to look at root

Or leave yii in root and move the views/websites part to /var/www[/b]

Security:

The website I am creating, will capture user data. Naturally I have a strong emphasis on security.

[b]Q3: Should I be using the dev or production install of yii on a vps whilst I am developing.

Q4: Should I be developing on a vps, or through desktop and then migrate to a vps when ready.

Q5: I am looking for resource on all security matters; I have been researching and keep finding snippets is there a one-stop check list of everything [apache, yii, vps settings; basically any setting sitting outside of the authentication within the website].[/b]

Thank you to everyone who has read this post.

Regards,

Bara.

P.S Sorry for length of post.

  1. It’s because it doesn’t have executable permissions. “chmod +x init” and it should be fine.

3,4. You should develop locally and never deploy debug version.

  1. No.