Answer the question
In order to leave comments, you need to log in
How to specify a different DocumentRoot for Apache to a specific url?
I have a virtual host of my local server (on openserver)
<VirtualHost 127.0.0.1:80>
DocumentRoot "F:/OpenServer/domains/portf.ru/yii2-app-advanced/frontend/web"
ServerName "portf.ru"
ServerAlias "portf.ru"
<IfModule alias_module>
ScriptAlias /cgi-bin/ "F:/OpenServer/domains/portf.ru/cgi-bin/"
</IfModule>
<Location /openserver/server-status>
SetHandler server-status
</Location>
</VirtualHost>
<Location /admin>
DocumentRoot "F:/OpenServer/domains/portf.ru/yii2-app-advanced/backend/web"
</Location>
Answer the question
In order to leave comments, you need to log in
doesn't rise because there can't be 2 docuemtroot
use Alias
httpd.apache.org/docs/2.2/urlmapping.html
if yii requires documentroot
create subdomain and separate virtualhost
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question