diff options
Diffstat (limited to 'posts/1/index.html')
-rw-r--r-- | posts/1/index.html | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/posts/1/index.html b/posts/1/index.html index 12dacc9..1839247 100644 --- a/posts/1/index.html +++ b/posts/1/index.html @@ -127,7 +127,7 @@ Due to personal interest, I didn&rsquo;t choose frame to base my website. I <p>Due to personal interest, I didn’t choose frame to base my website. I use <strong>Nginx</strong> but I don’t familiar with it. making it shows my content is not that difficult even that I don’t know much fancy state, but I stucked on SSL.</p> <p>In order to use https instead of http, I choosed <strong>let’s encrypt</strong>, which is good for me and it’s free. However, I can only getting my non-www domain working. when it comes to www domain, it still http.</p> <p>I found solutions all about using return to returning https, but it won’t work</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="font-weight:bold">server</span> { +<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="font-weight:bold">server</span> { </span></span><span style="display:flex;"><span> <span style="font-weight:bold">server_name</span> <span style="font-style:italic">www.garhve.com</span>; </span></span><span style="display:flex;"><span> <span style="font-weight:bold">return</span> 301 <span style="font-style:italic">https://www.garhve.com</span>$request_uri </span></span><span style="display:flex;"><span><span style="">}</span> @@ -135,7 +135,7 @@ Due to personal interest, I didn&rsquo;t choose frame to base my website. I <p>After searching and searching, I found where i was getting wrong.</p> <p>Above statement only return https-www which doesn’t hold any contents, all I need is to redirect the https-www to https-non-www.</p> <p>So, change to this one</p> -<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:2;-o-tab-size:2;tab-size:2;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="font-weight:bold">server</span> { +<div class="highlight"><pre tabindex="0" style="background-color:#fff;-moz-tab-size:4;-o-tab-size:4;tab-size:4;"><code class="language-nginx" data-lang="nginx"><span style="display:flex;"><span><span style="font-weight:bold">server</span> { </span></span><span style="display:flex;"><span> <span style="font-weight:bold">listen</span> 80; </span></span><span style="display:flex;"><span> <span style="font-weight:bold">server_name</span> <span style="font-style:italic">www.garhve.com</span> <span style="font-style:italic">garhve.com</span>; </span></span><span style="display:flex;"><span> <span style="font-weight:bold">return</span> 301 <span style="font-style:italic">https://garhve.com</span>$request_uri; |