Answer the question
In order to leave comments, you need to log in
How to make subdomains in Yii2+Apache?
There is, for example domain.loc
, and it has an entry point in the form of index.php, but I need to get into this index.php both by domain.loc
, and by >back.domain.loc
. Yes, and in principle I want to specify several domain names and control the path to the entry point.
Tried
<VirtualHost *:80>
DocumentRoot "%ssitedir%/yii/frontend/web"
ServerName api.domainq.loc
<Directory "%ssitedir%/yii/frontend/web">
Order Allow,Deny
Allow from all
</Directory>
</VirtualHost>
D:\OpenServer\modules\http\Apache_2.4-PHP_7.2-7.4\conf\httpd.conf
D:\OpenServer\userdata\config\Apache_2.4-PHP_7.2-7.4_server.conf
, that is, it Apache_2.4-PHP_7.2-7.4_server.conf
changes the settings httpd.conf
, and if you write the code above in httpd.conf
, then it will simply be erased when you restart the op, which is why you need to enter the code in Apache_2.4-PHP_7.2-7.4_server.conf
.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question