我正在尝试在同一台服务器上托管Magento 2和wordpress网站 Magento在端口80上。 3200端口上的Wordpress(可以是任何可用端口)
我的目标是:
123.123.123.123-Magento 2
123.123.123.123:3200-WordPress
这是我的Magento 2虚拟主机文件:
upstream fastcgi_backend {
server unix:/var/run/php/php7.2-fpm.sock;
}
server {
listen 80;
listen [::]:80;
server_name 123.123.123.123;
index index.php index.html index.htm;
set $MAGE_ROOT /path-to-magento-root;
set $MAGE_MODE developer;
include /path-to-magento-root/nginx.conf.sample;
}
这是我的wordpress虚拟主机文件:
server {
listen 3200;
server_name 123:123:123:123;
index index.php index.html index.htm;
root /path-to-wordpress-root;
}
我的Magento基本网址设置为http://123.123.123.123 我的Wordpress基本URL设置为http://123.123.123.123:3200
我的magento 2网站使用上述配置加载,但wordpress却没有。
我不确定会丢失什么,我在网络上尝试了多种解决方案,但都无法正常工作。