Question

I can't find the documentation specifying how to set the public html directory. I am trying to keep all other files and folders in the site root. Since there is a frontend and backend public html folder, I don't see how this is possible.

My Site:

/site/perl/
/site/www/      <-How do you get just the 2 public folders here?  
/site/.ssh

Yii Boilerplate:

runpostdeploy
yiic
/backend/
 - /config
 - /www/index.php
/frontend/
 - /config
 - /www/index.php
/common/
/console/
/tests/

Is the whole boilerplate project supposed to reside in the sites public html folder? I thought it was bad practice to do this.

*** U P D A T E ***

Spent most the day trying to figure out this problem. The closest thing I was able to find, was a comment on one of the Yii Framwork forum posts. For now, I'm running Boilerplate with subdomains like they recommend in this comment.

http://www.yiiframework.com/wiki/155/the-directory-structure-of-the-yii-project-site/#c9444

I'm not sure if this is the correct way. But it works.

Was it helpful?

Solution 3

Spent most the day trying to figure out this problem. The closest thing I was able to find, was a comment on one of the Yii Framwork forum posts. For now, I'm running Boilerplate with subdomains like they recommend in this comment.

http://www.yiiframework.com/wiki/155/the-directory-structure-of-the-yii-project-site/#c9444

I'm not sure if this is the correct way. But it works.

OTHER TIPS

You should set your site public director to frontend/www/. The idea behind Yii Boilerplate backend/www is to have separate domain for admin options (if needed), instead of having separate module. This way you'd be able to easily have separate CWebUser, Yii::app() etc. By the docs:

backend: the backend application which will be mainly used by site administrators to manage the whole system (avoiding admin modules at frontend application to avoid confusion)

I believe if you have two application, then you need two address. You can do with sub-dir like this:

www.site-name.com -> ../frontend/www/index.php
www.site-name.com/admin -> ../backend/www/index.php

Or you can use subdomain like this:

www.site-name.com -> ../frontend/www/index.php
admin.site-name.com -> ../backend/www/index.php

It's like Wordpress, if you need enter admin page, you access through address www.site-name.com/wp-admin

But, be sure you don't use the 'admin' path in your frontend if you use this alias to backend.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top