- Newest
- Most votes
- Most comments
my wordpress version 6.5.5 define('WP_SITEURL', 'http://DOMAIN/'); define('WP_HOME', 'http://DOMAIN/'); if (isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) && $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] === 'https') { $_SERVER['HTTPS'] = 'on'; }
my website database url https://sitename.com
or
http://sitename.com ? Which one will I use?
stil not working this url
https://d20dxgmq3z6jfk.cloudfront.net/
502 error
Try
http://sitename.com
please i.e. only HTTP ( no S )
Seems that your website working well I see, your website (https://odakmermer.com) is using CloudFront CDN.
And I cannot get your mean that you ask.
I'm using cache on the Lightsail distribution screen for WordPress.
When I set the cache mode to dynamic, everything works fine, but when I set it to static, I get a 502 error.
And this address always has a 502 error; you can see it if you visit the address. This is the distribution URL:
Hi,
If you are using a WordPress version 3.3.1-5 or higher, the wp-config.php
needs to have following lines:
define('WP_SITEURL', 'http://DOMAIN/');
define('WP_HOME', 'http://DOMAIN/');
if (isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'])
&& $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] === 'https') {
$_SERVER['HTTPS'] = 'on';
}
You may have copied the settings for a previous version of Wordpress. For more details check step 7 in this document: https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-editing-wp-config-for-distribution.html#configuring-non-https-wordpress-for-distribution.
You can check the WordPress version in your terminal by executing sudo wp core version
Thanks.
Point a domain to your Lightsail distribution (https://docs.aws.amazon.com/lightsail/latest/userguide/amazon-lightsail-point-domain-to-distribution.html)
My domain which using CloudFront distribution: status.microcharon.dev --CNAME-- d1h0kqcdy7oarf.cloudfront.net
Noticed that a CNAME cannot be placed at the root domain level
define('WP_SITEURL', 'http://odakmermer.com/'); define('WP_HOME', 'http://odakmermer.com/'); if ( isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) && $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] === 'https' ) { $_SERVER['HTTPS'] = 'on'; }
wp-config.php my settings
I transferred the database and WordPress wp-content from a different server. Could there be any issues with this? What kind of problems might arise?
Hello, my issue is still unresolved. The static mode in WordPress is not working. How can I fix it?
Hi,
To address the issues and fix your setup please follow these steps:
- Disable HTTP to HTTPS redirect in your instance by executing these commands in your WordPress Instance terminal:
sudo cp /opt/bitnami/lightsail/wp-config.php.backup /opt/bitnami/wordpress/wp-config.php
sudo cp /opt/bitnami/lightsail/wordpress-vhost.conf.backup /opt/bitnami/apache/conf/vhosts/wordpress-vhost.conf
sudo /opt/bitnami/ctlscript.sh restart
- Set the origin protocol policy of your lightsail distribution to HTTP only
Thanks.
Relevant content
- asked 2 years ago
- asked a year ago
- asked a year ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
Did you try the
wp-config.php
settings with HTTP as mentioned here https://repost.aws/questions/QUH6OzBx1gQ3qYLBW328JTJg/lightsail-distribution-problem-502-the-request-could-not-be-satisfied#COP-4fIr9qT9mqf5_Xx24WzA ?my code is this wp-config.php
define('WP_SITEURL', 'http://odakmermer.com/'); define('WP_HOME', 'http://odakmermer.com/'); if ( isset($_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO']) && $_SERVER['HTTP_CLOUDFRONT_FORWARDED_PROTO'] === 'https' ) { $_SERVER['HTTPS'] = 'on'; }