Howdy! 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:
<VirtualHost 127.0.0.1:80>
ServerName myserver.com
ServerAlias 127.0.0.1
DocumentRoot /var/www/html/yii/frontend/web/
<VirtualHost 127.0.0.1:80>
ServerName admin.myserver.com
ServerAlias 127.0.0.1
DocumentRoot /var/www/html/yii/backend/web/
</VirtualHost>
And there is nothing. What I have to do?
Big thanks for everybody!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi, I have written a complete guide on install Yii2 Framework using ssh I think this will help you out.
<VirtualHost 127.0.0.1:80>
Configuring the virtualhost on 127.0.0.1 allows you to access it only from the droplet itself because Apache would listen on the loopback interface only. Replace that with 0.0.0.0 and restart Apache and you should be good to go :)
This comment has been deleted
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.