We receive error about "redirected you too many times." after changing the Wordpress from HTTP to HTTPS. The WP is on AWS with Nginx and we have tried changing both define(home) and define(siteurl) in both database and wp-config file but no help.
Below is the current nginx config file, we also tried following some posts on Google to change HTTP to HTTPS, listening port to 443 but still no luck.
Thanks in advance.
server { listen 443; server_name wp.mywebsite.com; server_name www.mywp.mywebsite.com; include /etc/nginx/common_server_settings; location /wp-content/ { root /var/www/mywp.mywebsite.com; } location /wp-includes/ { root /var/www/mywp.mywebsite.com; } set $no_cache 0; # POST requests should always go to PHP if ($request_method = POST) { set $no_cache 1; } # Don't cache uris containing the following segments if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") { set $no_cache 1; } # Don't use the cache for logged in users or recent commenters if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_logged_in") { set $no_cache 1; } location / { proxy_http_version 1.1; proxy_set_header Host $http_host; #proxy_set_header Host "mywp.mywebsite.com"; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-Proto http; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_hide_header X-Powered-By; proxy_pass http://127.0.0.1:1080; proxy_cache_bypass $no_cache; proxy_no_cache $no_cache; proxy_cache_lock on; proxy_cache BLOG; proxy_cache_valid 5m; add_header X-Raw $no_cache; } }