WordPress Multisite - www가 없는 사이트에서 www로 기본 사이트 변경

WordPress Multisite - www가 없는 사이트에서 www로 기본 사이트 변경

wildcard SSL-Certificates자동발행 을 시작했습니다 acme-dns-client. 모든 하위 도메인을 함께 포괄할 수 있는 쉬운 방법이 있지만 www가 없는 도메인에 대한 적용 범위가 없다는 문제가 있습니다.

그러므로 나는 대신 change the no-www Mainsite에 그냥하는 것이 좋은 생각이 될 수 있다고 생각했습니다 .www.example.netexample.net


Wordpress Multisite 관리 대시보드에서는 사용할 수 없기 때문에 이러한 설정을 변경하는 방법을 제안하는 사람이 있습니까? 여기에서 하위 페이지의 하위 도메인을 변경할 수 있습니다.


나는 이미 다음 줄을 wp-config.php.

define('WP_HOME','https://www.example.net');
define('WP_SITEURL','https://www.example.net');

그러나 이것은 아직 해결되지 않았습니다. 저는 루트 웹 서버 시스템으로 nginx를 사용하고 있습니다.


Nginx 구성

server {
   location / {
            try_files $uri $uri/ /index.php?$args;
            }

            location ~ \.php$ {
                         include snippets/fastcgi-php.conf;
                         fastcgi_pass unix:/run/php/php7.4-fpm.sock;
             fastcgi_connect_timeout 300s;
                 fastcgi_read_timeout 300s;
                 fastcgi_send_timeout 300s;
            }

            location ~ /\.ht {
                         deny all;
            }

            location = /favicon.ico {
                         log_not_found off;
                         access_log off;
            }

            location = /robots.txt {
                         allow all;
                         log_not_found off;
                         access_log off;
           }

            location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
                         expires max;
                         log_not_found off;
           }

        root /var/www/wordpress;
        index index.php;

        server_name example.net www.example.net get.example.net *.example.net;

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/example.net/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/example.net/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

    #settings for file upload
    client_max_body_size 32M;
}

server {
    if ($host = example.net) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


        listen 80;

        server_name example.net *.example.net;
    return 404; # managed by Certbot


}

관련 정보