1.Wampee-3.1.0\bin\apache\apache2.4.33\conf\extra\httpd-vhosts.conf 这里可以配多个域名,修改对应的端口和网站的源码指向
<VirtualHost *:88>
ServerAdmin webmaster@dummy-host.example.com
DocumentRoot "E:/Wampee-3.1.0-beta-3.5/www/zw/public"
ServerName cc.com
ServerAlias cc.com
ErrorLog "E:/wwwroot/zw_new/logs/1.log"
# CustomLog "logs/dummy-host.example.com-access.log" common
</VirtualHost>
<VirtualHost *:89>
# ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "E:/Wampee-3.1.0-beta-3.5/www/1688order/server/public"
ServerName cc.localhost
ErrorLog "E:/wwwroot/zw_new/logs/2.log"
# CustomLog "logs/dummy-host2.example.com-access.log" common
</VirtualHost>
2.在E:\Wampee-3.1.0-beta-3.5\bin\apache\apache2.4.33\conf\httpd.conf下配置对应的监听端口号和服务
Listen 0.0.0.0:81
Listen [::0]:81
Listen 127.0.0.1:88
Listen 127.0.0.1:89
ServerName localhost:81
ServerName cc.com:88
ServerName cc.localhost:89
Include conf/extra/httpd-vhosts.conf 同时这一行是开启的
3.开启伪静态
.搜索找到“LoadModule rewrite_module modules/mod_rewrite.so”这一行,去掉前面的“#”;
3.找到“AllowOverride None”改为“AllowOverride All”;
新建.haccess文件,放在当前网站入口文件出,fastadmin和likeshop是在public下,下面是配置规则
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
env配置环境记得修改数据库的端口号是3307
app_debug = "true"
[database]
charset = "utf8mb4"
database = "novyssey"
debug = "1"
hostname = "127.0.0.1"
hostport = "3307"
password = ""
prefix = "ls_"
type = "mysql"
username = "root"
[project]
admin_name = "多商户后台"
env_name = "多商户后台"
file_domain = "lv.localhost:82"
ws_domain = "wss://127.0.0.1"