vielleicht weiß hier einer weiter mein Problem zu lösen, und zwar bekomme ich es einfach nicht hin, dass von http auf https weitergeleitet wird.
Hier mal meine Wordpress Nginx Conf:
Code: Select all
server {
        listen 89.163.242.6:80 accept_filter=dataready http2;
        listen [2001:4ba0:ffa5:00f8::1]:80 accept_filter=dataready http2;
        server_name phoenix-blog.de;
	rewrite ^ https://phoenix-blog.de$request_uri? permanent;
}
server {
	listen 89.163.242.6:443 accept_filter=dataready ssl http2;
	listen [2001:4ba0:ffa5:00f8::1]:443 accept_filter=dataready ssl http2;
	server_name phoenix-blog.de;
	add_header Strict-Transport-Security "max-age=31536000"; 
		
        root /usr/local/www/phoenix;
        index index.php;
        set  $memcached_key $uri;
        ssl_certificate xxx
        ssl_certificate_key xxx;
        ssl_trusted_certificate xxx;
        ssl_dhparam xxx;
        proxy_cache mycache;
        proxy_cache_valid 200 600s;
        proxy_cache_lock on;
        proxy_cache_lock_timeout 0s;
        proxy_cache_lock_age 200s;
        proxy_cache_use_stale updating;
        open_file_cache max=1000 inactive=20s;
        open_file_cache_valid 30s;
        open_file_cache_min_uses 5;
        open_file_cache_errors off;
        if ($request_method = POST) {
        set $skip_cache 1;
}
        if ($query_string != "") {
        set $skip_cache 1;
}
        if ($request_uri ~* "/wp-admin/|/xmlrpc.php|wp-.*.php|/feed/|index.php|sitemap(_index)?.xml") {
        set $skip_cache 1;
}
        if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
        set $skip_cache 1;
}
        location /      {
        try_files $uri $uri/ /index.php?$args;
}
location /dynamic_request {
        if ($args ~* format=json) { rewrite ^/dynamic_request/?(.*)$ /dynamic_request.js$1 break; }
        if ($args ~* format=xml)  { rewrite ^/dynamic_request/?(.*)$ /dynamic_request.xml$1 break; }
        memcached_pass 127.0.0.1:11211;
        error_page 404 = @dynamic_request;
}
       
location ~* \.^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
        add_header        Cache-Control public;
        add_header        Cache-Control must-revalidate;
        expires           7d;
        }
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
        root /usr/local/www/nginx-dist;
}
       
location ~ \.php$ {
        rewrite /wp-admin$ $scheme://$host$uri/ permanent;
        try_files $uri =404;
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $request_filename;
        fastcgi_cache_bypass $skip_cache;
        fastcgi_no_cache $skip_cache;
        fastcgi_cache WORDPRESS;
        fastcgi_cache_valid  60m;
        fastcgi_read_timeout 300;
        include fastcgi_params;
        limit_req zone=req_limit_per_ip burst=20;
 }
}Übrigens meine Seite einmal per http und dann mit https :
http://phoenix-blog.de
https://phoenix-blog.de
Ich habe es übrigens auch mit diesen Variablen versucht:
Code: Select all
server {
       listen 89.163.242.6:80 accept_filter=dataready http2;
       listen [2001:4ba0:ffa5:00f8::1]:80 accept_filter=dataready http2;
       server_name phoenix-blog.de;
       return 301 https://$server_name$request_uri;
    }Also ich verstehe es nicht!
