我已经配置了子域名forums.subdomain.net
它运行正常,我添加了 1 个重定向并删除了该重定向,之后它现在总是重定向到另一个子域。
server {
listen 80 ;
server_name forums.domain.net www.forums.domain.net;
# note that these lines are originally from the "location /" block
root /var/www/foldername.com/html_backup;
index index.html index.htm index.php;
location / {
# try_files $uri $uri/ /index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
https://forums.onesoftwares.net/wp/wp-admin/
尝试访问该路径。
子域名是 filesvr.subdomain.net 主域名是https://onesoftwares.net
注意:配置文件中没有添加重定向代码。