<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	
	>
<channel>
	<title>
	Comments on: How to Create Custom 404 Error Page in NGINX	</title>
	<atom:link href="https://www.tecmint.com/create-custom-nginx-error-page/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.tecmint.com/create-custom-nginx-error-page/</link>
	<description>Tecmint - Linux Howtos, Tutorials, Guides, News, Tips and Tricks.</description>
	<lastBuildDate>Fri, 11 Aug 2023 06:41:50 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>
		By: Ravi Saive		</title>
		<link>https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-2044239</link>

		<dc:creator><![CDATA[Ravi Saive]]></dc:creator>
		<pubDate>Fri, 11 Aug 2023 06:41:50 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=45852#comment-2044239</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-2043910&quot;&gt;demetry&lt;/a&gt;.

@Demetry,

Instead creating custum error configuration file, I suggest you to add following lines within the &lt;code&gt;http&lt;/code&gt; block to set up the custom error page in the mail &lt;strong&gt;/etc/nginx/nginx.conf&lt;/strong&gt; configuration file.
&lt;pre&gt;
http {
    # ... Other configuration settings ...

    server {
        listen 80;
        server_name your_domain.com;  # Replace with your actual domain name

        # Location block for the custom error page
        location / {
            error_page 404 403 500 503 /error-page.html;
            root /var/www/html;  # Replace with the actual path to your HTML file
            index index.html;
        }

        # ... Other server settings ...
    }
}
&lt;/pre&gt;
After making the changes, restart NGINX to apply the changes:
&lt;pre&gt;
$ sudo systemctl restart nginx
&lt;/pre&gt;]]></description>
			<content:encoded><![CDATA[<p>In reply to <a target="_blank" href="https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-2043910">demetry</a>.</p>
<p>@Demetry,</p>
<p>Instead creating custum error configuration file, I suggest you to add following lines within the <code>http</code> block to set up the custom error page in the mail <strong>/etc/nginx/nginx.conf</strong> configuration file.</p>
<pre>
http {
    # ... Other configuration settings ...

    server {
        listen 80;
        server_name your_domain.com;  # Replace with your actual domain name

        # Location block for the custom error page
        location / {
            error_page 404 403 500 503 /error-page.html;
            root /var/www/html;  # Replace with the actual path to your HTML file
            index index.html;
        }

        # ... Other server settings ...
    }
}
</pre>
<p>After making the changes, restart NGINX to apply the changes:</p>
<pre>
$ sudo systemctl restart nginx
</pre>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: demetry		</title>
		<link>https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-2043910</link>

		<dc:creator><![CDATA[demetry]]></dc:creator>
		<pubDate>Thu, 10 Aug 2023 10:25:30 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=45852#comment-2043910</guid>

					<description><![CDATA[&lt;code&gt;location&lt;/code&gt; directive is not allowed here in &lt;strong&gt;/etc/nginx/snippets/custom-error-page.conf:2&lt;/strong&gt;.]]></description>
			<content:encoded><![CDATA[<p><code>location</code> directive is not allowed here in <strong>/etc/nginx/snippets/custom-error-page.conf:2</strong>.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Chip		</title>
		<link>https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-1908098</link>

		<dc:creator><![CDATA[Chip]]></dc:creator>
		<pubDate>Tue, 01 Nov 2022 08:17:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=45852#comment-1908098</guid>

					<description><![CDATA[On &lt;strong&gt;Runcloud&lt;/strong&gt; I get these options under &lt;strong&gt;Type&lt;/strong&gt; window.

Should I go with &#039;location.main-before&#039;? 

I want to set a 404 error page for a static custom website. 

Thanks.]]></description>
			<content:encoded><![CDATA[<p>On <strong>Runcloud</strong> I get these options under <strong>Type</strong> window.</p>
<p>Should I go with &#8216;location.main-before&#8217;? </p>
<p>I want to set a 404 error page for a static custom website. </p>
<p>Thanks.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Martin Jenkins		</title>
		<link>https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-1869907</link>

		<dc:creator><![CDATA[Martin Jenkins]]></dc:creator>
		<pubDate>Tue, 30 Aug 2022 15:34:26 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=45852#comment-1869907</guid>

					<description><![CDATA[Hi, great article thanks!

My client sends an HTTP header - X-Correlation-Id - and when nginx there is a circumstance when nginx sends a 404, I&#039;d like to include in the 404 page, the X-Correlation-Id HTTP Header, with the same value, so that we can match up nicely.

How do I do that? Thank you!]]></description>
			<content:encoded><![CDATA[<p>Hi, great article thanks!</p>
<p>My client sends an HTTP header &#8211; X-Correlation-Id &#8211; and when nginx there is a circumstance when nginx sends a 404, I&#8217;d like to include in the 404 page, the X-Correlation-Id HTTP Header, with the same value, so that we can match up nicely.</p>
<p>How do I do that? Thank you!</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Fred		</title>
		<link>https://www.tecmint.com/create-custom-nginx-error-page/comment-page-1/#comment-1848888</link>

		<dc:creator><![CDATA[Fred]]></dc:creator>
		<pubDate>Thu, 21 Jul 2022 15:30:46 +0000</pubDate>
		<guid isPermaLink="false">https://www.tecmint.com/?p=45852#comment-1848888</guid>

					<description><![CDATA[Hello, I followed your guide, and implemented the directions but is not getting to work.

nginx: [emerg] &quot;internal&quot; directive is not allowed here in /etc/nginx/snippets/custom-error-page.conf:4.

I have tried placing include /etc/nginx/snippets/custom-error-page.conf; at different places in the nginx.conf file and get a different error message.

Thanks]]></description>
			<content:encoded><![CDATA[<p>Hello, I followed your guide, and implemented the directions but is not getting to work.</p>
<p>nginx: [emerg] &#8220;internal&#8221; directive is not allowed here in /etc/nginx/snippets/custom-error-page.conf:4.</p>
<p>I have tried placing include /etc/nginx/snippets/custom-error-page.conf; at different places in the nginx.conf file and get a different error message.</p>
<p>Thanks</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
