<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Nginx.conf | SDT 攻城獅區</title>
	<atom:link href="https://sdt.hameba.tw/tag/nginx-conf/feed/" rel="self" type="application/rss+xml" />
	<link>https://sdt.hameba.tw</link>
	<description>由Steven, Der, Ted 三位高級打字員所組成，是三位工程師(攻城獅)所維護的技術分享平台，或許偶爾會分享一些日常，有任何問題或是錯誤的部分，歡迎留言告訴我們！</description>
	<lastBuildDate>Sun, 08 Dec 2019 04:57:06 +0800</lastBuildDate>
	<language>zh-TW</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.3</generator>

<image>
	<url>https://sdt.hameba.tw/wp-content/uploads/2020/02/hameba_favicon-150x150.png</url>
	<title>Nginx.conf | SDT 攻城獅區</title>
	<link>https://sdt.hameba.tw</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Nginx 增加安全性</title>
		<link>https://sdt.hameba.tw/193/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=nginx-%25e5%25a2%259e%25e5%258a%25a0%25e5%25ae%2589%25e5%2585%25a8%25e6%2580%25a7</link>
				<comments>https://sdt.hameba.tw/193/#respond</comments>
				<pubDate>Thu, 05 Dec 2019 06:22:45 +0000</pubDate>
		<dc:creator><![CDATA[Hsu Steven]]></dc:creator>
				<category><![CDATA[System]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Nginx.conf]]></category>

		<guid isPermaLink="false">http://192.168.100.203/?p=193</guid>
				<description><![CDATA[<p>基本安裝完Nginx 都是default 當出現404 403畫面最底部就會顯示nginx版本 其實這也有告訴 &#8230; </p>
<p class="link-more"><a href="https://sdt.hameba.tw/193/" class="more-link">閱讀全文<span class="screen-reader-text">〈Nginx 增加安全性〉</span></a></p>
The post <a href="https://sdt.hameba.tw/193/">Nginx 增加安全性</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></description>
								<content:encoded><![CDATA[<p>基本安裝完Nginx 都是default</p>
<p>當出現404 403畫面最底部就會顯示nginx版本</p>
<p><span id="more-193"></span></p>
<p>其實這也有告訴外面的人你所使用的server application 版本，透過此版本要查到相關漏洞是非常容易。</p>
<p>所以可以透過幾個步驟增加安全</p><pre class="crayon-plain-tag"># 修改nginx設定檔案 每個os路徑不一樣
$ sudo nano /etc/nginx/nginx.conf

#在http 內添加server_tokens off; 此可以擋掉版本洩漏問題
http {
   ...
   server_tokens off;
   ...
}</pre><p>&nbsp;</p>
<p>另外可以參考此篇<a href="/?p=184" target="_blank" rel="noopener noreferrer">Raspberry pi 安裝 Nginx及擴充module</a></p>
<p>當完成後module包裡面就有header filter模組</p><pre class="crayon-plain-tag"># 修改nginx設定檔案
$ sudo nano /etc/nginx/nginx.conf

# nginx.conf 增加以下內容

# 引用ngx_http_headers_more_filter_module
load_module modules/ngx_http_headers_more_filter_module.so;

http {
    ...
    more_clear_headers Server;
    ...
}</pre><p>每次請求(request) header也會藏有Server資訊也是會產生洩漏資訊的問題</p>
<p>Reference</p>
<p><a href="https://www.getpagespeed.com/server-setup/nginx/how-to-remove-the-server-header-in-nginx">https://www.getpagespeed.com/server-setup/nginx/how-to-remove-the-server-header-in-nginx</a></p>
<div id="gtx-trans">
<div class="gtx-trans-icon"></div>
</div>The post <a href="https://sdt.hameba.tw/193/">Nginx 增加安全性</a> first appeared on <a href="https://sdt.hameba.tw">SDT 攻城獅區</a>.]]></content:encoded>
							<wfw:commentRss>https://sdt.hameba.tw/193/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
							</item>
	</channel>
</rss>
