2017-03-10 7 views
0

私は上記のエラーを取得していますし、原因を特定することはできません。nginxのWordpressの - <site>リダイレクトあなたも何回

define('WP_HOME','http://example.com'); 
define('WP_SITEURL','http://example.com'); 

しかし、成功せず:

私は解決策を試してみました。私はそれが私のnginxの設定やWordPressのバグの問題だと思う?

私はsites-enableに他の設定があり、それらをすべて削除して、何の成功もなしにnginxをリロードしようとしました。

nginxの設定:

server { 
    listen 80; 
    # Make site accessible from http://localhost/ 
    server_name <site name>; 
    return 301 https://$host$request_uri; 
} 

server { 
    listen 443 http2; 

    server_name <site name>; 

    ssl on; 
    ssl_certificate /etc/ssl/private/server.crt; 
    ssl_certificate_key /etc/ssl/private/server.key; 
    # side note: only use TLS since SSLv2 and SSLv3 have had recent vulnerabilities 
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2; 

    root /gctl_wp/; 

    index index.html index.htm index.php; 
    server_name <site name>; 

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

    location ~ \.php$ { 
     fastcgi_split_path_info ^(.+\.php)(/.+)$; 
     fastcgi_pass unix:/var/run/php7-fpm.sock; 
     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 
     fastcgi_index index.php; 
     include fastcgi_params; 
    } 
} 

答えて

0

あなたはhttpとしてあなたのサイトに定義されているがhttpsの下でそれを実装しています。正しいサイトのURLを設定する必要があります。

define('WP_HOME','https://example.com'); 
define('WP_SITEURL','https://example.com'); 
関連する問題