B is like default structure except you put all code directly in web root folder (you do not have parent folder like ‘myApp’). Why the hell are you doing that ?
Install yii. After this i’ve composer.json, composer.phar and the vendor folder under htdocs
I create project advanced. So i’ve add htdocs/advanced now
What was NOT clear to me is that I can ( I MUST) delete root composer.* and root/vendor folder
I just tried and all is working well (and the yii2-admin extension now works… )
So i’ve now only a ‘flat’ index.html into the htdocs root and i’ve created the virtual hosts pointing to ‘advanced/frontend/web’ and to ‘advanced/backend/web’.
Please, consider this is my development environment and I’ve not yet read about deploying an advanced app.
Also, my production server has 100+ folders into server root, but of course we’ll point the ‘webroot’ of single domains to the right dir
Sounds OK. You could actually run Yii with almost any structure you create. The issue with placing code and configs into webroot is possible security breach.
This is my development environment, in production I’ve a shared host (sigh… ) so server security actually it’s not a my problem. Client forced me to use THIS production server…
Yes, I’ll do exactly what you have written, because my shared host bring me the problem of cannot have ‘frontend’ and ‘backend’ divided into 2 subdomains (like I’ve done in other situations)
There is absolutely no control panel for this situation.
I explain. I’m on we.register.it.
The main domain has full access to every kind of config
If you create a subdomain, like yii2.app.it, register.it will create a /public/yii2 folder, and there is no way, I think, to force yii2.app.it to point to /pubic/yii2/<something>
Well, if there’s support for .htaccess you may try putting index.php into root directory while putting everything else into “protected” that will be denied for web access.