<?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>linux Archieven - Utilewebsites</title>
	<atom:link href="https://www.utilewebsites.nl/en/section/linux/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.utilewebsites.nl/en/section/linux/</link>
	<description></description>
	<lastBuildDate>Fri, 21 Aug 2026 08:54:17 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.1.4</generator>
	<item>
		<title>Powerful Render Server Cooling in a Compact Case: Airflow Optimization with Targeted Intake and Top Exhaust</title>
		<link>https://www.utilewebsites.nl/en/knowledgebase/krachtige-render-server-koelen-in-een-compacte-behuizing-airflow-optimalisatie-met-gerichte-intake-en-top-exhaust/</link>
		
		<dc:creator><![CDATA[UtileWebsites]]></dc:creator>
		<pubDate>Fri, 21 Aug 2026 08:49:45 +0000</pubDate>
				<guid isPermaLink="false">https://www.utilewebsites.nl/knowledgebase/krachtige-render-server-koelen-in-een-compacte-behuizing-airflow-optimalisatie-met-gerichte-intake-en-top-exhaust/</guid>

					<description><![CDATA[<p>A render server for demanding graphics tasks and AI workloads requires well-designed cooling. During prolonged image and video generation, the graphics card often operates at full capacity for hours. Without sufficient fresh air intake and effective exhaust, heat can build up inside the case, causing the fans to run faster and temperatures to rise unnecessarily. In this article, we explain how a compact server case can be optimally cooled for continuous and reliable use through targeted modifications. Initial situation The main components of this render node are: In many compact cases, the front panel is almost completely closed. Although a&#160;<a href="https://www.utilewebsites.nl/en/knowledgebase/krachtige-render-server-koelen-in-een-compacte-behuizing-airflow-optimalisatie-met-gerichte-intake-en-top-exhaust/" class="read-more">Continue Reading</a></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/krachtige-render-server-koelen-in-een-compacte-behuizing-airflow-optimalisatie-met-gerichte-intake-en-top-exhaust/">Powerful Render Server Cooling in a Compact Case: Airflow Optimization with Targeted Intake and Top Exhaust</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">A render server for demanding graphics tasks and AI workloads requires well-designed cooling. During prolonged image and video generation, the graphics card often operates at full capacity for hours. Without sufficient fresh air intake and effective exhaust, heat can build up inside the case, causing the fans to run faster and temperatures to rise unnecessarily.</p>



<p class="wp-block-paragraph">In this article, we explain how a compact server case can be optimally cooled for continuous and reliable use through targeted modifications.</p>



<h4 class="wp-block-heading">Initial situation</h4>



<p class="wp-block-paragraph">The main components of this render node are:</p>



<ul class="wp-block-list">
<li><strong>GPU:</strong> RTX 24 GB graphics card</li>



<li><strong>CPU:</strong> Ryzen 7 processor</li>



<li><strong>CPU cooler:</strong> Scythe Mugen tower cooler (push-pull configuration with 2 fans)</li>



<li><strong>Exhaust:</strong> 1 exhaust fan at the rear and 2 additional exhaust fans at the top</li>



<li><strong>Usage:</strong> intensive tasks such as continuous image and video generation</li>



<li><strong>Load:</strong> continuous long-term power consumption of up to approximately 300 W by the graphics card</li>



<li><strong>Optimizations:</strong> undervolting combined with targeted push-pull and exhaust airflow</li>
</ul>



<p class="wp-block-paragraph">In many compact cases, the front panel is almost completely closed. Although a fan can operate at the front, the amount of fresh air actually drawn into the case is often limited. This can cause warm air to circulate around the high-performance components.</p>



<h4 class="wp-block-heading">The solution: targeted airflow and active heat exhaust</h4>



<p class="wp-block-paragraph">To solve this issue, a round <strong>102 mm</strong> opening was made in the lower section of the front panel. A <strong>120 mm intake fan</strong> with a fine dust filter was installed directly behind it.</p>



<p class="wp-block-paragraph">This fan blows cool outside air directly towards the underside and fans of the graphics card. Because this component produces the most heat during rendering, direct airflow in this location has the greatest effect.</p>



<p class="wp-block-paragraph">On the exhaust side, <strong>three exhaust fans</strong> — one at the rear and two at the top — ensure that the rising heat from the graphics card and CPU cooler is removed directly and without delay.</p>



<svg width="100%" viewBox="0 0 680 430" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="Schematic airflow in a compact render server with top exhaust fans">
  <defs>
    <marker id="arrowBlue" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
      <path d="M0,0 L8,4 L0,8 Z" fill="#2786e8"/>
    </marker>
    <marker id="arrowCoral" markerWidth="8" markerHeight="8" refX="7" refY="4" orient="auto">
      <path d="M0,0 L8,4 L0,8 Z" fill="#e36c63"/>
    </marker>
  </defs>

  <text x="340" y="24" text-anchor="middle" class="th t">Airflow: direct GPU intake, rear &amp; dual top exhaust</text>
  <text x="340" y="44" text-anchor="middle" class="ts">Side view — front on the left, rear on the right, active top exhaust</text>

  <!-- Behuizing -->
  <rect x="88" y="70" width="490" height="280" rx="18" fill="var(--color-background-secondary)" stroke="var(--color-border-secondary)" stroke-width="1"/>
  <text x="105" y="94" class="ts">Compact server case</text>

  <!-- Front paneel -->
  <rect x="100" y="140" width="26" height="130" rx="5" fill="var(--color-background-tertiary)" stroke="var(--color-border-secondary)" stroke-width="0.5"/>
  <text x="113" y="130" text-anchor="middle" class="ts">Front</text>

  <!-- Front Intake Fan onderin -->
  <circle cx="113" cy="240" r="23" fill="#d8eefc" stroke="#2786e8" stroke-width="1"/>
  <path d="M113 220 L119 236 L113 236 Z M132 240 L116 246 L116 240 Z M113 260 L107 244 L113 244 Z M94 240 L110 234 L110 240 Z" fill="#2786e8"/>
  <text x="113" y="284" text-anchor="middle" class="th ts">120 mm intake</text>
  <text x="113" y="298" text-anchor="middle" class="ts">102 mm opening + filter</text>

  <!-- RTX 24GB -->
  <rect x="180" y="235" width="240" height="60" rx="8" fill="#fbdedb" stroke="#e36c63" stroke-width="1"/>
  <circle cx="210" cy="265" r="17" fill="#fff4ef" stroke="#e36c63" stroke-width="1"/>
  <circle cx="390" cy="265" r="17" fill="#fff4ef" stroke="#e36c63" stroke-width="1"/>
  <text x="300" y="258" text-anchor="middle" class="th t">RTX 24 GB</text>
  <text x="300" y="278" text-anchor="middle" class="ts">Direct supply of fresh outside air</text>

  <!-- Scythe Mugen CPU Koeler -->
  <rect x="250" y="140" width="145" height="55" rx="8" fill="#d8eefc" stroke="#2786e8" stroke-width="1"/>
  <rect x="260" y="148" width="22" height="38" rx="4" fill="#fff" stroke="#2786e8" stroke-width="0.5"/>
  <rect x="362" y="148" width="22" height="38" rx="4" fill="#fff" stroke="#2786e8" stroke-width="0.5"/>
  <text x="322" y="160" text-anchor="middle" class="th ts">Scythe Mugen</text>
  <text x="322" y="176" text-anchor="middle" class="ts">Ryzen 7 (push-pull)</text>

  <!-- 2x Boven Ventilatoren (Top Exhaust) -->
  <circle cx="300" cy="88" r="17" fill="#fbdedb" stroke="#e36c63" stroke-width="1"/>
  <circle cx="430" cy="88" r="17" fill="#fbdedb" stroke="#e36c63" stroke-width="1"/>
  <text x="365" y="104" text-anchor="middle" class="th ts">2x Top Exhaust fans</text>

  <!-- Achter Ventilator (Rear Exhaust) -->
  <circle cx="545" cy="165" r="23" fill="#fbdedb" stroke="#e36c63" stroke-width="1"/>
  <path d="M545 145 L551 161 L545 161 Z M564 165 L548 171 L548 165 Z M545 185 L539 169 L545 169 Z M526 165 L542 159 L542 165 Z" fill="#e36c63"/>
  <text x="545" y="204" text-anchor="middle" class="th ts">Rear Exhaust</text>

  <!-- Luchtstroom pijlen -->
  <!-- Intake naar GPU -->
  <path d="M140 240 C155 240 162 245 175 250" fill="none" stroke="#2786e8" stroke-width="4" marker-end="url(#arrowBlue)"/>
  <path d="M140 265 L175 265" fill="none" stroke="#2786e8" stroke-width="4" marker-end="url(#arrowBlue)"/>

  <!-- GPU warme lucht omhoog & naar achter -->
  <path d="M420 250 C465 230 490 200 520 178" fill="none" stroke="#e36c63" stroke-width="4" marker-end="url(#arrowCoral)"/>
  <path d="M360 235 C380 200 410 140 425 110" fill="none" stroke="#e36c63" stroke-width="3" marker-end="url(#arrowCoral)"/>

  <!-- CPU doorstroming & omhoog -->
  <path d="M395 165 L515 165" fill="none" stroke="#e36c63" stroke-width="4" marker-end="url(#arrowCoral)"/>
  <path d="M295 140 L298 110" fill="none" stroke="#e36c63" stroke-width="3" marker-end="url(#arrowCoral)"/>

  <!-- Legenda -->
  <line x1="140" y1="380" x2="185" y2="380" stroke="#2786e8" stroke-width="4" marker-end="url(#arrowBlue)"/>
  <text x="195" y="384" class="ts">Cool outside air (intake)</text>
  <line x1="380" y1="380" x2="425" y2="380" stroke="#e36c63" stroke-width="4" marker-end="url(#arrowCoral)"/>
  <text x="435" y="384" class="ts">Warm exhaust air (rear + 2x top)</text>

  <text x="340" y="412" text-anchor="middle" class="ts">Result: positive pressure near the GPU and active three-way exhaust of rising heat.</text>
</svg>



<h4 class="wp-block-heading">Results under heavy load</h4>



<p class="wp-block-paragraph">During prolonged rendering and generation tasks, when the RTX 24 GB continuously consumes approximately <strong>300 W</strong> and operates at 100% load, the measurements show the following stable values:</p>



<ul class="wp-block-list">
<li>CPU temperature (Ryzen 7): remains around 70 °C under load, with peaks of approximately 74 °C. With the Scythe Mugen, this remains within safe limits.</li>



<li><strong>GPU fans:</strong> run quietly at approximately <strong>53% to 60%</strong>;</li>



<li><strong>CPU temperature (Ryzen 7):</strong> remains stable at around <strong>62 °C</strong> thanks to the Scythe Mugen;</li>



<li><strong>Motherboard temperature:</strong> remains cool at around <strong>32 °C</strong>.</li>
</ul>



<h4 class="wp-block-heading">Main benefits of this setup</h4>



<ul class="wp-block-list">
<li><strong>Thermal headroom:</strong> the GPU remains well below the critical temperatures at which thermal throttling occurs.</li>



<li><strong>Fast removal of rising heat:</strong> the two fans at the top remove warm air directly before it can heat up the CPU cooler or other components.</li>



<li><strong>Quiet operation and reduced wear:</strong> because the fans do not need to operate at full speed, noise levels remain low and the bearings experience less wear.</li>



<li><strong>No heat buildup:</strong> heat is expelled directly through the rear and the top of the case.</li>



<li><strong>Reliability:</strong> the system is highly suitable for prolonged, uninterrupted AI and rendering processes.</li>
</ul>



<h4 class="wp-block-heading">Conclusion</h4>



<p class="wp-block-paragraph">By combining a targeted 102 mm opening with a dust filter at the front, a Scythe Mugen tower cooler on the Ryzen 7, and a three-way exhaust system — 1x rear and 2x top — a compact case can effectively cool a powerful RTX 24 GB graphics card during prolonged operation at full load.</p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/krachtige-render-server-koelen-in-een-compacte-behuizing-airflow-optimalisatie-met-gerichte-intake-en-top-exhaust/">Powerful Render Server Cooling in a Compact Case: Airflow Optimization with Targeted Intake and Top Exhaust</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Send all emails to one recipient using Postfix / fakemail / development server</title>
		<link>https://www.utilewebsites.nl/en/knowledgebase/send-all-emails-to-one-recipient-using-postfix-fakemail-development-server/</link>
		
		<dc:creator><![CDATA[UtileWebsites]]></dc:creator>
		<pubDate>Fri, 09 Jun 2023 11:41:07 +0000</pubDate>
				<guid isPermaLink="false">https://www.utilewebsites.nl/knowledgebase/send-all-emails-to-one-recipient-using-postfix-fakemail-development-server/</guid>

					<description><![CDATA[<p>As a developer on a test server, it is essential for you to have full control over the emails being sent during application testing. Imagine that you are working on a project and constantly need to send test messages to a specific email address, allowing you to easily monitor email flows and perform automated tests. To facilitate this, Postfix, a popular mail transfer agent, provides a convenient configuration option. By making some changes to the Postfix configuration files on your test server, you can ensure that all outgoing emails are delivered to a single recipient. This centralizes and simplifies the&#160;<a href="https://www.utilewebsites.nl/en/knowledgebase/send-all-emails-to-one-recipient-using-postfix-fakemail-development-server/" class="read-more">Continue Reading</a></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/send-all-emails-to-one-recipient-using-postfix-fakemail-development-server/">Send all emails to one recipient using Postfix / fakemail / development server</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">As a developer on a test server, it is essential for you to have full control over the emails being sent during application testing. Imagine that you are working on a project and constantly need to send test messages to a specific email address, allowing you to easily monitor email flows and perform automated tests.</p>



<p class="wp-block-paragraph">To facilitate this, Postfix, a popular mail transfer agent, provides a convenient configuration option. By making some changes to the Postfix configuration files on your test server, you can ensure that all outgoing emails are delivered to a single recipient. This centralizes and simplifies the email flow, providing you with a better overview during the testing process.</p>



<p class="wp-block-paragraph">Add the following to the end of the configuration file /etc/postfix/main.cf:</p>



<pre class="wp-block-code"><code># Aangepaste toevoeging - alleen verzenden naar één e-mailadres.
recipient_canonical_classes = envelope_recipient
recipient_canonical_maps = regexp:/etc/postfix/recipient_canonical_map
</code></pre>



<p class="wp-block-paragraph">In the file /etc/postfix/master.cf:</p>



<p class="wp-block-paragraph">Find the line that looks something like this (without the "#" in front of it):</p>



<pre class="wp-block-code"><code>smtp unix - - n - - smtp
</code></pre>



<p class="wp-block-paragraph">Immediately after that, add the following line:</p>



<pre class="wp-block-code"><code>-o smtp_header_checks=regexp:/etc/postfix/smtp_header_checks
</code></pre>



<p class="wp-block-paragraph">Create a new file /etc/postfix/recipient_canonical_map and add the following:</p>



<pre class="wp-block-code"><code># Voer het e-mailadres in waarnaar je alle e-mails wilt laten bezorgen.
# Bijvoorbeeld, mijn configuratie leest "/./ geoff+dev@garbers.co.za"
/./ jouw@email.hier
</code></pre>



<p class="wp-block-paragraph">Also, create a new file /etc/postfix/smtp_header_checks and add the following:</p>



<pre class="wp-block-code"><code># Dit zal de hele onderwerpregel nemen en er "&#91;devmail]" voor plaatsen, als een andere manier om het te filteren.
/Subject:(.*)/ REPLACE Subject: &#91;devmail] $1
</code></pre>



<p class="wp-block-paragraph">After you have updated and created these configuration files, reload Postfix by running the following:</p>



<pre class="wp-block-code"><code>&#91;~]# service postfix reload
</code></pre>



<p class="wp-block-paragraph">If you have the mail command installed, send a test message to a nonexistent e-mail address:</p>



<pre class="wp-block-code"><code>&#91;~]# echo 'test' | mail -s 'test email' niemand@example.org
</code></pre>



<p class="wp-block-paragraph">To deny and disable the connection, edit the file /etc/postfix/main.cf:</p>



<pre class="wp-block-code"><code>vi /etc/postfix/main.cf
</code></pre>



<p class="wp-block-paragraph">Comment out the following lines by placing "#" in front of them:</p>



<pre class="wp-block-code"><code># content_filter = amavis:&#91;127.0.0.1]:10024
# receive_override_options = no_address_mappings
</code></pre>



<p class="wp-block-paragraph"></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/send-all-emails-to-one-recipient-using-postfix-fakemail-development-server/">Send all emails to one recipient using Postfix / fakemail / development server</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>swap file to save memory space and improve system performance on Debian (linux)</title>
		<link>https://www.utilewebsites.nl/en/knowledgebase/swap-file-to-save-memory-space-and-improve-system-performance-on-debian-linux/</link>
		
		<dc:creator><![CDATA[UtileWebsites]]></dc:creator>
		<pubDate>Wed, 15 Mar 2023 09:28:09 +0000</pubDate>
				<guid isPermaLink="false">https://www.utilewebsites.nl/knowledgebase/swap-file-to-save-memory-space-and-improve-system-performance-on-debian-linux/</guid>

					<description><![CDATA[<p>If you are using a Debian system, it may be useful to have a swap file to save memory space and improve system performance. Below we explain how to create and activate a swap file on a Debian-based system. Step 1: Make sure swap memory is enabled To check if swap memory is already active on your system, run the following command: If there is no output, then no swap memory is active on your system. Step 2: Create a swap file To create a swap file, use the following command: This will create a swap file the size of&#160;<a href="https://www.utilewebsites.nl/en/knowledgebase/swap-file-to-save-memory-space-and-improve-system-performance-on-debian-linux/" class="read-more">Continue Reading</a></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/swap-file-to-save-memory-space-and-improve-system-performance-on-debian-linux/">swap file to save memory space and improve system performance on Debian (linux)</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">If you are using a Debian system, it may be useful to have a swap file to save memory space and improve system performance. Below we explain how to create and activate a swap file on a Debian-based system.</p>

<p class="wp-block-paragraph">Step 1: Make sure swap memory is enabled</p>

<p class="wp-block-paragraph">To check if swap memory is already active on your system, run the following command:</p>

<pre class="wp-block-code"><code>swapon --show</code></pre>

<p class="wp-block-paragraph">If there is no output, then no swap memory is active on your system.</p>

<p class="wp-block-paragraph">Step 2: Create a swap file</p>

<p class="wp-block-paragraph">To create a swap file, use the following command:</p>

<pre class="wp-block-code"><code>sudo fallocate -l 6G /swapfile</code></pre>

<p class="wp-block-paragraph">This will create a swap file the size of 6 gigabytes. Note that "sudo" is used to gain root privileges to create the file.</p>

<p class="wp-block-paragraph">Step 3: Format the swap file</p>

<p class="wp-block-paragraph">After the swap file is created, you must format it to use it as swap memory.</p>

<pre class="wp-block-code"><code>sudo mkswap /swapfile</code></pre>

<p class="wp-block-paragraph">Step 4: Activate the swap file</p>

<p class="wp-block-paragraph">Now you can activate the swap file with the following command:</p>

<pre class="wp-block-code"><code>sudo swapon /swapfile</code></pre>

<p class="wp-block-paragraph">Step 5: Make sure the swap file is active</p>

<p class="wp-block-paragraph">To verify that the swap file is active, run the <code>swapon --show</code> command again. If everything is done correctly, there will be an output that lists the swap file.</p>

<p class="wp-block-paragraph">It is important to remember that a swap file is not permanent, meaning that it will not start up automatically upon a reboot of the system. To solve this, you can add the swap file to the <code>/etc/fstab</code> file so that the system will automatically activate it at boot time.</p>

<p class="wp-block-paragraph">We hope this article has helped you to create and activate a swap file on a Debian system. If you have any questions, don't hesitate to ask!</p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/swap-file-to-save-memory-space-and-improve-system-performance-on-debian-linux/">swap file to save memory space and improve system performance on Debian (linux)</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Boot boot problems Debian / lunix Recovery</title>
		<link>https://www.utilewebsites.nl/en/knowledgebase/boot-boot-problems-debian-lunix-recovery/</link>
		
		<dc:creator><![CDATA[UtileWebsites]]></dc:creator>
		<pubDate>Wed, 17 May 2017 07:56:09 +0000</pubDate>
				<guid isPermaLink="false">https://www.utilewebsites.nl/knowledgebase/boot-boot-problems-debian-lunix-recovery/</guid>

					<description><![CDATA[<p>Boot boot problems Debian / lunix In case your debian-linux system does not boot properly or crashes during boot and you can boot in recovery mode, the steps below could be a quick solution to restore your system. This performs an update and also restores your system. 1: apt-get update 2: dpkg --configure -a 3: apt-get dist-upgrade 4: apt-get -f install 5: exit</p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/boot-boot-problems-debian-lunix-recovery/">Boot boot problems Debian / lunix Recovery</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>  Boot boot problems Debian / lunix</p>
<p>In case your debian-linux system does not boot properly or crashes during boot and you can boot in recovery mode, the steps below could be a quick solution to restore your system. This performs an update and also restores your system.</p>
<pre>1: apt-get update
2: dpkg --configure -a
3: apt-get dist-upgrade
4: apt-get -f install
5: exit</pre>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/boot-boot-problems-debian-lunix-recovery/">Boot boot problems Debian / lunix Recovery</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>What can I do with a .htaccess file / common examples (apache)</title>
		<link>https://www.utilewebsites.nl/en/knowledgebase/what-can-i-do-with-a-htaccess-file-common-examples-apache/</link>
		
		<dc:creator><![CDATA[UtileWebsites]]></dc:creator>
		<pubDate>Fri, 14 Oct 2016 12:44:37 +0000</pubDate>
				<guid isPermaLink="false">https://www.utilewebsites.nl/knowledgebase/what-can-i-do-with-a-htaccess-file-common-examples-apache/</guid>

					<description><![CDATA[<p>A .htaccess file (with a dot!) is a file type with no name. It is used for Web sites running on an Apache server. You can use it to execute certain things and change or bypass some (server) settings. Below we give you some examples of .htaccess rules that are commonly used. Before some things need to be "rewritten" but first the general stuff. Blocking certain IP numbers If you want to block an ip number to the site then do so with the following rules: order deny,allow deny from 12.34.56.78 deny from 78.56.34.12 allow from all Order is :&#160;<a href="https://www.utilewebsites.nl/en/knowledgebase/what-can-i-do-with-a-htaccess-file-common-examples-apache/" class="read-more">Continue Reading</a></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/what-can-i-do-with-a-htaccess-file-common-examples-apache/">What can I do with a .htaccess file / common examples (apache)</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>  A .htaccess file (with a dot!) is a file type with no name. It is used for Web sites running on an Apache server. You can use it to execute certain things and change or bypass some (server) settings. Below we give you some examples of .htaccess rules that are commonly used. Before some things need to be "rewritten" but first the general stuff.</p>
<p><strong>Blocking certain IP numbers</strong><br />
If you want to block an ip number to the site then do so with the following rules:</p>
<pre class="lang-php prettyprint prettyprinted"><code>order deny,allow
deny from 12.34.56.78
deny from 78.56.34.12
allow from all
</code></pre>
<p>Order is : first all deny's are executed and only then the allows. Thus, first the indicated IP numbers are blocked and the others are allowed.</p>
<p><strong>Block access .htaccess</strong><br />
To prevent people from viewing your .htacces, you can block access. You then add the following script:</p>
<pre class="lang-php prettyprint prettyprinted"><code>order allow,deny
deny from all
</code></pre>
<p>The above rules apply specifically to the .htaccess file. Of course, one can also protect other files and folders using the same rules.</p>
<p><strong>Define the index file</strong><br />
When querying the root or a specific folder, the server will search for the index file. This is the file to be displayed if no file is defined. For example: www.mijndomein.nl/uwfolder/. In most cases, servers have the following files set up: index.html, index.htm, default.asp (IIS), index.php (Apache). You can adjust this in the following way</p>
<pre class="lang-php prettyprint prettyprinted"><code>DirectoryIndex willekeurig.html
</code></pre>
<p><strong>Custom error messages</strong><br />
Most servers have set their default page for error messages. If you want to customize this to your own look-and-feel (html page) of, say, a 404 page, you can do so in the way below :</p>
<pre class="lang-php prettyprint prettyprinted"><code>ErrorDocument 403 /fouten/geen-toegang.html
ErrorDocument 404 /fouten/niet-gevonden.html
</code></pre>
<p><strong>Basic redirects</strong><br />
You can set some basic redirects in .htaccess. You can attach conditions to these or not. For conditions you use regular expressions . Here are some examples</p>
<pre class="lang-php prettyprint prettyprinted"><code>Redirect 301 /uwoudebestand.php http://www.mijndomein.nl/nieuwemap/uwnieuwebestand.php
</code></pre>
<p>Make sure that the second address is a complete address, otherwise this will not work. The 301 is the redirect code for a permanent redirect.</p>
<p><strong>Turn on the rewrite engine</strong><br />
The previous ones were the basic setting. Now the rewrite engine can be turned on. These rules allow you to do a rewrite/redirect based on some data (hostname, referer, filename, querystring, method). To turn on the engine, use the following line:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteEngine on
</code></pre>
<p><strong>One host name for your website</strong><br />
It may be desirable for SEO reasons to have your website available on 1 hostname. This will prevent duplicate content from occurring because your website will be indexed on domain A and domain B. Also, you don't want your website to be indexed on both www.site.nl and site.co.uk. To avoid this, add the following lines</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteCond %{HTTP_HOST} !^www\.mijndomein\.nl [NC]
RewriteRule ^(.*)$ http://www\.mijndomein\.nl/$1 [L,R=301]
</code></pre>
<p>This indicates: if the hostname is not (the exclamation mark stands for: not) www.mijndomein.nl then a 301 redirect should be done to www.mijndomein.nl. With a few additional settings like [NC], you say the case (upper/lower case) can be ignored. With [L] you say that this last line should be executed immediately. The [R=301] indicates that it should not be a rewrite but a redirect of type 301 (permanent).</p>
<p><strong>Old domain/website redirects</strong><br />
The above rules are meant to perform a redirect only if the old domain is linked to the new server in the DNS. As a result, all requests will be handled on 1 server. If this is not possible, you can place a redirect on the old server. This redirect then looks like this :</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteRule ^(.*)$ http://www\.mijndomein\.nl/$1 [L,R=301]
</code></pre>
<p><strong>Extreme traffic redirects</strong><br />
It may happen that your website is linked in a place that does not make you happy because it costs a huge amount of data traffic and brings visitors to your website that do not add value. In this case, place some rules to subtly redirect all this traffic:</p>
<pre class="lang-php prettyprint prettyprinted"><code>
RewriteCond %{HTTP_REFERER} deverkeerdesite\.nl [NC]
RewriteRule ^(.*)$ http://www.google.nl [L,R=302]
</code></pre>
<p>Visitors who are then directed to your website from deverkeerdesite.nl will now be redirected to Google. This can be just the difference between an overload (server overload) and staying online.</p>
<p><strong>Redirecting from http to https<br />
</strong>The code below will redirect all your traffic destined for http: to https:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
</code></pre>
<p><em>Note this will redirect using the 301 'permanently moved' redirect, which will help transfer your SEO rankings.</em></p>
<p><strong>Rewrite everything but...</strong><br />
In most cases, the rewrite engine is used to rewrite so-called neat urls behind the scenes to 1 file that handles everything else. For example, you can internally rewrite the address /folder/map2/file/ to index.php?folder/map2/file/:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteRule ^(.*)$ /index.php?$1 [L]
</code></pre>
<p>You can attach certain conditions to this: rewrite all urls unless it is an existing folder or file. You can use this to have links to PDF files, for example, not rewritten but simply ignored:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?$1 [L]
</code></pre>
<p><strong>Rewrite a particular folder</strong><br />
You can also redirect or rewrite 1 particular folder. You then use a condition to limit the rule to 1 folder:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteCond %{REQUEST_URI} ^/deze_map/ [NC]
RewriteRule ^(.*)$ /index_voor_map.php?$1 [L]
</code></pre>
<p>and in addition there are the following 2 lines:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteCond %{REQUEST_METHOD} GET
RewriteCond %{REQUEST_URI} !^/nog_een_map/
</code></pre>
<p>These rules say that the request method must be GET (you can of course use POST here as well) and that the folder /yet_a_folder/ can be ignored. Note here the exclamation point which means 'not'.</p>
<p><strong>Multiple conditions</strong><br />
If you want to use multiple conditions, you can header them with the OR:</p>
<pre class="lang-php prettyprint prettyprinted"><code>RewriteCond %{REQUEST_URI} ^/map1/$ [NC,OR]
RewriteCond %{REQUEST_URI} ^/map2/$ [NC]
</code></pre>
<p><strong>In conclusion</strong></p>
<p>Above we have explained to you some basic redirect and rewrite rules which you can extend and combine where possible. Hoping we have helped you on your way with this.</p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/what-can-i-do-with-a-htaccess-file-common-examples-apache/">What can I do with a .htaccess file / common examples (apache)</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>different PHP version CLI executable for one command / different php versions and CLI</title>
		<link>https://www.utilewebsites.nl/en/knowledgebase/different-php-version-cli-executable-for-one-command-different-php-versions-and-cli/</link>
		
		<dc:creator><![CDATA[UtileWebsites]]></dc:creator>
		<pubDate>Mon, 02 May 2016 14:42:27 +0000</pubDate>
				<guid isPermaLink="false">https://www.utilewebsites.nl/knowledgebase/different-php-version-cli-executable-for-one-command-different-php-versions-and-cli/</guid>

					<description><![CDATA[<p>In order to invoke the cli command on a server with different php versions by the appropriate php version, one can execute it in the following method : $ env PATH=""/usr/local/php55/bin:$PATH" php -v waarbij /usr/local/php55/ The route is to the PHP version on your server If you run this correctly you will see the php version in the terminal. Below is an example of what this might look like : PHP 5.5.30 (cli) (built: Oct 9 2015 15:12:26) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies with the ionCube PHP Loader (enabled) + Intrusion&#160;<a href="https://www.utilewebsites.nl/en/knowledgebase/different-php-version-cli-executable-for-one-command-different-php-versions-and-cli/" class="read-more">Continue Reading</a></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/different-php-version-cli-executable-for-one-command-different-php-versions-and-cli/">different PHP version CLI executable for one command / different php versions and CLI</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>In order to invoke the cli command on a server with different php versions by the appropriate php version, one can execute it in the following method :</p>
<pre class="lang-php prettyprint prettyprinted"><code><span class="pln">$ env PATH</span><span class="pun">=</span><span class="str">""/usr/local/php55/bin:$PATH"</span><span class="pln"> php </span><span class="pun">-</span><span class="pln">v

waarbij <span style="font-size: small;"><span class="str">/usr/local/php55/ The route is to the PHP version on your server</span></span>
</span></code></pre>
<p>If you run this correctly you will see the php version in the terminal. Below is an example of what this might look like :</p>
<p><em>PHP 5.5.30 (cli) (built: Oct 9 2015 15:12:26)</em><br />
<em> Copyright (c) 1997-2015 The PHP Group</em><br />
<em> Zend Engine v2.5.0, Copyright (c) 1998-2015 Zend Technologies</em><br />
<em> with the ionCube PHP Loader (enabled) + Intrusion Protection from ioncube24.com (unconfigured) v5.0.17, Copyright (c) 2002-2015, by ionCube Ltd.</em></p>
<p>Het bericht <a href="https://www.utilewebsites.nl/en/knowledgebase/different-php-version-cli-executable-for-one-command-different-php-versions-and-cli/">different PHP version CLI executable for one command / different php versions and CLI</a> verscheen eerst op <a href="https://www.utilewebsites.nl/en/">Utilewebsites</a>.</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
