<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="th">
	<id>http://planningwiki.oou.cmu.ac.th/index.php?action=history&amp;feed=atom&amp;title=Source_code</id>
	<title>Source code - ประวัติรุ่นแก้ไข</title>
	<link rel="self" type="application/atom+xml" href="http://planningwiki.oou.cmu.ac.th/index.php?action=history&amp;feed=atom&amp;title=Source_code"/>
	<link rel="alternate" type="text/html" href="http://planningwiki.oou.cmu.ac.th/index.php?title=Source_code&amp;action=history"/>
	<updated>2026-04-26T14:16:40Z</updated>
	<subtitle>ประวัติรุ่นแก้ไขของหน้านี้ในวิกิ</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>http://planningwiki.oou.cmu.ac.th/index.php?title=Source_code&amp;diff=6&amp;oldid=prev</id>
		<title>Admin: สร้างหน้าด้วย &quot;EDIT: Resolution and working configs:  wp-config.php: Add the lines below to wp-config.php to force https (as per the link here)... Note that in order for this to work for me, I had to put the lines at the top of my wp-config.php config file.  if ( (!empty( $_SERVER[&#039;HTTP_X_FORWARDED_HOST&#039;])) ||       (!empty( $_SERVER[&#039;HTTP_X_FORWARDED_FOR&#039;])) ) {        $_SERVER[&#039;HTTPS&#039;] = &#039;on&#039;;  }   My Nginx reverse proxy config on my separate Nginx server:...&quot;</title>
		<link rel="alternate" type="text/html" href="http://planningwiki.oou.cmu.ac.th/index.php?title=Source_code&amp;diff=6&amp;oldid=prev"/>
		<updated>2024-07-17T02:17:33Z</updated>

		<summary type="html">&lt;p&gt;สร้างหน้าด้วย &amp;quot;EDIT: Resolution and working configs:  wp-config.php: Add the lines below to wp-config.php to force https (as per the link here)... Note that in order for this to work for me, I had to put the lines at the top of my wp-config.php config file.  if ( (!empty( $_SERVER[&amp;#039;HTTP_X_FORWARDED_HOST&amp;#039;])) ||       (!empty( $_SERVER[&amp;#039;HTTP_X_FORWARDED_FOR&amp;#039;])) ) {        $_SERVER[&amp;#039;HTTPS&amp;#039;] = &amp;#039;on&amp;#039;;  }   My Nginx reverse proxy config on my separate Nginx server:...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;หน้าใหม่&lt;/b&gt;&lt;/p&gt;&lt;div&gt;EDIT: Resolution and working configs:&lt;br /&gt;
&lt;br /&gt;
wp-config.php: Add the lines below to wp-config.php to force https (as per the link here)... Note that in order for this to work for me, I had to put the lines at the top of my wp-config.php config file.&lt;br /&gt;
&lt;br /&gt;
if ( (!empty( $_SERVER[&amp;#039;HTTP_X_FORWARDED_HOST&amp;#039;])) ||&lt;br /&gt;
&lt;br /&gt;
     (!empty( $_SERVER[&amp;#039;HTTP_X_FORWARDED_FOR&amp;#039;])) ) {&lt;br /&gt;
&lt;br /&gt;
      $_SERVER[&amp;#039;HTTPS&amp;#039;] = &amp;#039;on&amp;#039;;&lt;br /&gt;
&lt;br /&gt;
} &lt;br /&gt;
&lt;br /&gt;
My Nginx reverse proxy config on my separate Nginx server:&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
&lt;br /&gt;
    listen 443 ssl;&lt;br /&gt;
&lt;br /&gt;
    server_name foo.bar www.foo.bar;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
&lt;br /&gt;
        proxy_pass &amp;lt;nowiki&amp;gt;http://10.0.80.32/&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
        proxy_set_header X-Forwarded-Host $host;&lt;br /&gt;
&lt;br /&gt;
proxy_set_header X-Forwarded-Server $host;&lt;br /&gt;
&lt;br /&gt;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;&lt;br /&gt;
&lt;br /&gt;
proxy_set_header X-Forwarded-Proto $scheme;&lt;br /&gt;
&lt;br /&gt;
proxy_set_header X-Real-IP $remote_addr;&lt;br /&gt;
&lt;br /&gt;
proxy_set_header Host $host;&lt;br /&gt;
&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    ssl_certificate /etc/letsencrypt/live/foo.bar/fullchain.pem;&lt;br /&gt;
&lt;br /&gt;
    ssl_certificate_key /etc/letsencrypt/live/foo.bar/privkey.pem;&lt;br /&gt;
&lt;br /&gt;
    include /etc/letsencrypt/options-ssl-nginx.conf;&lt;br /&gt;
&lt;br /&gt;
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;&lt;br /&gt;
&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
server {&lt;br /&gt;
&lt;br /&gt;
    server_name foo.bar www.foo.bar;&lt;br /&gt;
&lt;br /&gt;
    return 301 &amp;lt;nowiki&amp;gt;https://foo.bar$request_uri&amp;lt;/nowiki&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>