Answer the question
In order to leave comments, you need to log in
YII2 Advanced CNC. How to access without frontend/web/ in url?
Delivered advanced application.
yiiadvance.lc/frontend/web
yiiadvance.lc/backend/web
_ _ _ _
_ _ backe... ???
ps Site on openserver.
Answer the question
In order to leave comments, you need to log in
Specify the appropriate documentroot in the server configuration.
For frontend: open domains in OpenServer and add yiiadvance.lc => (frontend/web folder)
For admin panel: you need to configure Alias in Apache config + add a line to htaccess'e backend/web. Now I can’t write from memory how and what, but after 3 hours the laptop will be at hand and I will throw off the necessary config if no one writes the correct answer before me (I have it implemented exactly the same as you want)
UPD
1) In the virtual config Apache hosts (Advanced->Configuration->Apache-xy->Apache-x.y_vhost.conf) must be added at the beginning:
<VirtualHost *:80>
ServerName yiiadvance.lc
DocumentRoot "%sprogdir%/domains/yiiadvance.lc/frontend/web"
Alias /admin "%sprogdir%/domains/yiiadvance.lc/backend/web"
<Directory "%sprogdir%/domains/yiiadvance.lc/backend/web">
Options +Indexes
AllowOverride All
</Directory>
</VirtualHost>
RewriteBase /admin
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question