【发布时间】:2021-09-03 19:40:44
【问题描述】:
我在 Xampp 上配置 virtualhost,以便我可以运行高级 Yii2 项目(带有前端和后端应用程序),我关注了 this instruction 和我的 @987654324 @看起来像这样
<VirtualHost *:8081>
ServerName winnersprimary.ac.tz
DocumentRoot 'c:\xampp\htdocs\winnersprimary\frontend\web\'
<Directory 'c:\xampp\htdocs\winnersprimary\frontend\web\'>
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
# use index.php as index file
DirectoryIndex index.php
# ...other settings...
# Apache 2.4
Require all granted
## Apache 2.2
# Order allow,deny
# Allow from all
</Directory>
</VirtualHost>
<VirtualHost *:8081>
ServerName admin.winnersprimary.ac.tz
DocumentRoot 'c:\xampp\htdocs\winnersprimary\backend\web\'
<Directory 'c:\xampp\htdocs\winnersprimary\backend\web\'>
# use mod_rewrite for pretty URL support
RewriteEngine on
# If a directory or a file exists, use the request directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Otherwise forward the request to index.php
RewriteRule . index.php
# use index.php as index file
DirectoryIndex index.php
# ...other settings...
# Apache 2.4
Require all granted
## Apache 2.2
# Order allow,deny
# Allow from all
</Directory>
</VirtualHost>
虽然 apache 主端口是 8081 和 SSL 端口 4433 但它给出了如下图所示的错误,error.log 说 [Sat Jun 19 11:01:06.453372 2021] [ssl:warn] [pid 11044:tid 172] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name 我应该怎么做解决这个错误?我已经尝试过多次更改端口号,但均未成功。
【问题讨论】:
标签: php apache xampp yii2-advanced-app yii2-basic-app