Question from newbie installing Yii2 advanced

October 18, 2014 3.6k views

I'd idea to install Yii2 framework. It's almost done, but I had no idea how to work with Apache. They said:
+++Set document roots of your web server:
for frontend /path/to/yii-application/frontend/web/ and using the URL http://frontend/
for backend /path/to/yii-application/backend/web/ and using the URL http://backend/

I did this in console:

sudo nano /etc/apache2/sites-available/default 

Than I wrote this:

    DocumentRoot /var/www/html/yii/frontend/web/

    DocumentRoot /var/www/html/yii/backend/web/

And there is nothing. What I have to do?

Big thanks for everybody!

1 comment
  • I am also a newbie and trying to run the yii 2 as i create a virtual host for YII2 frontend but for backend i am not able to get what to do , so it can run just with a url as example Please help me on this

3 Answers

Configuring the virtualhost on allows you to access it only from the droplet itself because Apache would listen on the loopback interface only. Replace that with and restart Apache and you should be good to go :)

Hi, I have written a complete guide on install Yii2 Framework using ssh I think this will help you out.

Have another answer? Share your knowledge.