<?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>LinuxPractice</title>
	<atom:link href="http://www.linuxpractice.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.linuxpractice.com</link>
	<description>Linux for everyone</description>
	<lastBuildDate>Sun, 05 Feb 2012 00:59:05 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>chmod 775 is not the answer!</title>
		<link>http://www.linuxpractice.com/?p=143</link>
		<comments>http://www.linuxpractice.com/?p=143#comments</comments>
		<pubDate>Sat, 04 Feb 2012 19:01:59 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[Back to Basics]]></category>
		<category><![CDATA[Linux Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=143</guid>
		<description><![CDATA[Securing your website&#8217;s files is often overlooked by many running interactive sites. One of the most common answers is chmod 775. chmod 775 makes WordPress and other common systems happy, but it is not the correct solution. Newbies get chided and derided on message boards for not understanding Linux file systems and permissions. The following…]]></description>
			<content:encoded><![CDATA[<p>Securing your website&#8217;s files is often overlooked by many running interactive sites.  One of the most common answers is <code>chmod 775</code>.  <code>chmod 775</code> makes WordPress and other common systems happy, but it is not the correct solution.  Newbies get chided and derided on message boards for not understanding Linux file systems and permissions.  </p>
<p>The following will not work in a shared hosting environment.  If you are using shared hosting, consider moving to a VPS.  The cost is similiar and you get the full capabilities of a standalone Linux server.  </p>
<p>The correct answer to website file permissions is <code>chmod 600</code> for files and <code>chmod 700</code> for directories.  On a properly setup server, the http daemon runs under it&#8217;s own account.  You only need to allow the http daemon read and write access to the website files and directories.  You do not need the http daemon group having access nor do you need to allow any other user or process having access.  </p>
<p>Why <code>chmod 600</code> for files?  For older sites written in CGI,Python, Ruby, Perl or system executables, you need execute permissions.  For PHP and serving most modern webcontent such as html and javascript, there is no need to allow execute permissions.   </p>
<p>Why code>chmod 700</code> for directories?  You need to alloow the httpd daemon to enter directories.</p>
<p>There is a catch, <code>chmod -R 700 /path/to/website</code> will set everythign under <code>/path/to/website</code> to 700.  <code>chmod -R 600 /path/to/website</code> will make your subdirectories inaccessible to the http daemon.</p>
<p>The trick is to set <code>chmod 600</code> for files and <code>chmod 700</code> for directories.<br />
<code><br />
chmod -R ugo=,u+rwX /path/to/website<br />
</code></p>
<p>What this does is clear all permissions, then sets the user permission to rw and the capital X sets only the directories as executable("x").</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=143</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rename files based upon cotent</title>
		<link>http://www.linuxpractice.com/?p=134</link>
		<comments>http://www.linuxpractice.com/?p=134#comments</comments>
		<pubDate>Mon, 23 Jan 2012 20:39:49 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[Linux Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=134</guid>
		<description><![CDATA[I was faced with a question today, how do you take a bunch of files with no extension and give them the proper extension. I have never faced this problem and did not have an immediately correct answer. thinking it through, I derived the following: fgrep -l '&#60;?php' /home/fakeuser/* &#124; cut -f4 -d/ &#124; xargs…]]></description>
			<content:encoded><![CDATA[<p>I was faced with a question today, how do you take a bunch of files with no extension and give them the proper extension.  I have never faced this problem and did not have an immediately correct answer.  thinking it through, I derived the following:<br />
<code>fgrep  -l '&lt;?php' /home/fakeuser/* | cut -f4 -d/ | xargs -I {} cp {} {}.php </code><br />
<code>fgrep  -l '#!/bin/bash' /home/fakeuser/* | cut -f4 -d/ | xargs -I {} cp {} {}.pl </code></p>
<p>This only covers 2 possible file types and the patterns would also have to checked with a better regex to not miss files.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=134</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Heartbeat</title>
		<link>http://www.linuxpractice.com/?p=120</link>
		<comments>http://www.linuxpractice.com/?p=120#comments</comments>
		<pubDate>Mon, 23 Jan 2012 04:29:27 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[Linux Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=120</guid>
		<description><![CDATA[The same configurations must be on all nodes in the cluster. Install pssh to make this easy. Install heartbeat. yum install heartbeat Copy needed files: cp /usr/share/doc/heartbeat-2.1.4/authkeys /etc/ha.d/ cp /usr/share/doc/heartbeat-2.1.4/ha.cf /etc/ha.d/ cp /usr/share/doc/heartbeat-2.1.4/haresources /etc/ha.d/ Edit authkeys: vi /etc/ha.d/authkeys auth 2 2 sha1 test-ha Secure authkeys: chmod 600 /etc/ha.d/authkeys Edit HA confiure file: vi /etc/ha.d/ha.cf Add/change:…]]></description>
			<content:encoded><![CDATA[<p>The same configurations must be on all nodes in the cluster.  Install pssh to make this easy.</p>
<p>Install heartbeat.<br />
<code>yum install heartbeat</code></p>
<p>Copy needed files:<br />
<code>cp /usr/share/doc/heartbeat-2.1.4/authkeys /etc/ha.d/<br />
cp /usr/share/doc/heartbeat-2.1.4/ha.cf /etc/ha.d/<br />
cp /usr/share/doc/heartbeat-2.1.4/haresources /etc/ha.d/</code></p>
<p>Edit authkeys:<br />
<code>vi /etc/ha.d/authkeys</code><br />
<code>auth 2<br />
2 sha1 test-ha</code><br />
Secure authkeys:<br />
<code>chmod 600 /etc/ha.d/authkeys</code></p>
<p>Edit HA confiure file:<br />
<code>vi /etc/ha.d/ha.cf</code></p>
<p>Add/change:<br />
<code>logfile /var/log/ha-log<br />
logfacility local0<br />
keepalive 2<br />
deadtime 30<br />
initdead 120<br />
bcast eth0<br />
udpport 694<br />
auto_failback on<br />
node node-1.mydomain.com<br />
node node-2.mydomain.com</code></p>
<p>Edit haresources:<br />
<code>vi /etc/ha.d/haresources</code><br />
Add<br />
<code>node-1.mydomain.com 10.100.100.101 httpd</code></p>
<p>Edit httpd.conf to listen on new IP:<br />
<code>vi /etc/httpd/conf/httpd.conf</code><br />
<code>Listen 10.100.100.101:80</code></p>
<p>On node 1:<br />
<code>echo "node-1.mydomain.com apache test server" > /var/www/html/index.html</code></p>
<p>On node 2:<br />
<code>echo "node-2.mydomain.com apache test server" > /var/www/html/index.html</code></p>
<p>Restart heartbeat:<br />
<code>/etc/init.d/heartbeat restart</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=120</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>List of Linux Commands.</title>
		<link>http://www.linuxpractice.com/?p=109</link>
		<comments>http://www.linuxpractice.com/?p=109#comments</comments>
		<pubDate>Sat, 21 Jan 2012 14:20:02 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[Back to Basics]]></category>
		<category><![CDATA[Linux Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=109</guid>
		<description><![CDATA[A general list of Linux commands. User accounts adduser is alias to useradd &#8211; add a new user account useradd [options] LOGIN useradd -m -g wheel -s /bin/bash newadminuser passwd &#8211; modify user passwords passwd [OPTION...] LOGIN passwd newadminuser groupadd &#8211; Add a new group groupadd [options] group usermod [options] LOGIN usermod -G admins newadminuser…]]></description>
			<content:encoded><![CDATA[<p>A general list of Linux commands.</p>
<p>User accounts<br />
adduser is alias to useradd &#8211;  add a new user account<br />
useradd [options] LOGIN<br />
useradd -m -g wheel -s /bin/bash newadminuser</p>
<p>passwd &#8211; modify user passwords<br />
passwd [OPTION...] LOGIN<br />
passwd newadminuser</p>
<p>groupadd &#8211; Add a new group<br />
groupadd [options] group</p>
<p>usermod [options] LOGIN<br />
usermod -G admins newadminuser</p>
<p>Shell customization<br />
alias &#8211; create an alias<br />
unalias &#8211; remove alias<br />
alias [-p] [name[=value] &#8230; ]<br />
alias rm=&#8217;rm -i&#8217;</p>
<p>Searching files and text</p>
<p>awk<br />
find &#8211; Find files<br />
find [path...] [expression]<br />
find / -type f -iname &#8220;core&#8221;</p>
<p>grep &#8211; find text in files<br />
grep [OPTION]&#8230; PATTERN [FILE] &#8230;<br />
grep -r &#8217;500&#8242; /var/log/httpd/*</p>
<p>Networking</p>
<p>dig &#8211; dns lookups<br />
dig [@global-server] [domain] [q-type] [q-class] {q-opt}<br />
 {global-d-opt} host [@local-server] {local-d-opt}<br />
[ host [@local-server] {local-d-opt} [...]]<br />
dig linuxpractive.com mx</p>
<p>losf &#8211; list of open files<br />
[-?abhlnNoOPRstUvVX] [+|-c c] [+|-d s] [+D D] [+|-f]<br />
[-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]]<br />
[-p s] [+|-r [t]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [-Z [Z]] [--] [names]<br />
lsof -Pnl +M -i4</p>
<p>Netstat<br />
netstat &#8211;help<br />
netstat [-veenNcCF] [<Af>] -r         netstat {-V|&#8211;version|-h|&#8211;help}<br />
netstat [-vnNcaeol] [<Socket> ...]<br />
netstat { [-veenNac] -I[<Iface>] | [-veenNac] -i | [-cnNe] -M | -s } [delay]<br />
netstat -npl<br />
netstat -l</p>
<p>nslookup &#8211; qery dns<br />
nslookup [ - option ] &#8230; host [ server ]<br />
nslookup server localhost host www.google.com<br />
nslookup -type=mx google.com</p>
<p>File and directory commands</p>
<p>ls &#8211; List directory contents</p>
<p>ln &#8211; create links and shortcuts.<br />
Usage: ln [OPTION]&#8230; [-T] TARGET LINK_NAME   (1st form)<br />
  or:  ln [OPTION]&#8230; TARGET                  (2nd form)<br />
  or:  ln [OPTION]&#8230; TARGET&#8230; DIRECTORY     (3rd form)<br />
  or:  ln [OPTION]&#8230; -t DIRECTORY TARGET&#8230;  (4th form)<br />
ln /var/log/maillog maillog</p>
<p>link &#8211; create a link<br />
link filename linkname<br />
link /var/log/maillog maillog</p>
<p>unlink &#8211; Remove a link<br />
unlink maillog</p>
<p>du &#8211; shoow disk usage</p>
<p>df &#8211; show free space</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=109</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux Run Levels</title>
		<link>http://www.linuxpractice.com/?p=86</link>
		<comments>http://www.linuxpractice.com/?p=86#comments</comments>
		<pubDate>Wed, 18 Jan 2012 17:59:19 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[Back to Basics]]></category>
		<category><![CDATA[Linux Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=86</guid>
		<description><![CDATA[The SysV init runlevel system is a standard system for controlling which services and programs the init programs starts and stops at each run level. There are 7 init runlevels (RH based distros). init 0 Halt the system. Same as shutdown -h now init 1 Single user mode, read only file system. Always run fsck…]]></description>
			<content:encoded><![CDATA[<p>The SysV init runlevel system is a standard system for controlling which services and programs the init programs starts and stops at each run level.  </p>
<p>There are 7 init runlevels (RH based distros).  </p>
<table style="border:none">
<tr>
<td nowrap>init 0</td>
<td>Halt the system.  Same as  <code>shutdown -h now</code> </td>
</tr>
<tr>
<td>init 1</td>
<td>Single user mode, read only file system.  Always run  <code>fsck -y </code> if you plan on remounting the root filesystem for writing.  Use  <code>mount -uw / </code>  to remount the filesystem in RW mode.  It is not a good idea to use <code>exit</code> to leave single user mode because it does not ensure a clean system. Use <code>init 6</code> instead. </td>
</tr>
<tr>
<td>init 2</td>
<td>Multi user without NFS.</td>
</tr>
<tr>
<td>init 3</td>
<td>Start all services and daemons except X and any GUI&#8217;s.  Most commonly used for command line access and on servers.</td>
</tr>
<tr>
<tr>
<td>init 4</td>
<td>Custom level, unused</td>
</tr>
<tr>
<td>init 5</td>
<td>Multi user mode with full GUI.  Most commonly used for desktops.</td>
</tr>
<tr>
<td>init 6</td>
<td>Reboot, once entered, you cannot stop the machine from rebooting.</td>
</tr>
</table>
<p>You can set the default run level by modifying the inidefault parameter in /etc/inittab.</p>
<p><code>vi /etc/inittab</code><br />
Change the line:<br />
<code>id:3:initdefault:</code><br />
And then Reboot.<br />
<code>init 6</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=86</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fix WordPress Social Login PHP Error</title>
		<link>http://www.linuxpractice.com/?p=69</link>
		<comments>http://www.linuxpractice.com/?p=69#comments</comments>
		<pubDate>Mon, 09 Jan 2012 05:24:46 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[WebServer Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=69</guid>
		<description><![CDATA[Installing the WordPress Social Login will throw an error if short_open_tag are not enabled in your php.ini when you access Settings\ WP Social Login. Parse error: syntax error, unexpected $end in /path/to/wordpress/wp-content/plugins/wordpress-social-login/includes/plugin.settings/plugin.settings.1.php on line 167 Other areas of this plugin will show a similiar error. On line 90 of plugin.settings.1.php change: &#60;? To &#60;?php On…]]></description>
			<content:encoded><![CDATA[<p>Installing the WordPress Social Login will throw an error if short_open_tag are not enabled in your php.ini when you access Settings\ WP Social Login.  </p>
<blockquote><p>Parse error: syntax error, unexpected $end in /path/to/wordpress/wp-content/plugins/wordpress-social-login/includes/plugin.settings/plugin.settings.1.php on line 167 </p></blockquote>
<p>Other areas of this plugin will show a similiar error.</p>
<p>On line 90 of plugin.settings.1.php change:<br />
<code> &lt;? </code><br />
To<br />
<code> &lt;?php </code><br />
On line 91 of plugin.settings.4.php change:<br />
<code> &lt;? </code><br />
To<br />
<code> &lt;?php </code><br />
On line 34, 61 and 88 of plugin.settings.7.php change:<br />
<code> &lt;? </code><br />
To<br />
<code> &lt;?php </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=69</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop WordPress FTP prompt</title>
		<link>http://www.linuxpractice.com/?p=56</link>
		<comments>http://www.linuxpractice.com/?p=56#comments</comments>
		<pubDate>Mon, 09 Jan 2012 02:04:52 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[WebServer Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=56</guid>
		<description><![CDATA[WordPress seems to &#8220;randomly&#8221; decide that it wants to use ftp to do updates. All resources I looked into claimed that if the wp-content directory was writeable by the webserver process, then WordPress would not prompt for the ftp login. Previously the solution was to install the pecl SSH2 extension sftp account for the wordpress…]]></description>
			<content:encoded><![CDATA[<p>WordPress seems to &#8220;randomly&#8221; decide that it wants to use ftp to do updates.  All resources I looked into claimed that if the wp-content directory was writeable by the webserver process, then WordPress would not prompt for the ftp login.  Previously the solution was to install the pecl  SSH2 extension sftp account for the wordpress user and block it at the firewall.  </p>
<p>I recently encountered this problem again and have found a proper solution.  </p>
<p>Open your wp-config.php file for editing and add: </p>
<p><code>define('FS_METHOD','direct');</code></p>
<p>To the end of the file.  Save it and no more ftp prompt.  You can also do this simply with:</p>
<p><code>echo "define('FS_METHOD','direct');" >> /path/to/wp-config</code></p>
<p>While you are logged into the server, might as well check and fix any insecure file permissions.  Change [webowner] and [/path/to/website] to their respectivce values for yoru server.</p>
<p><code>chown -R webowner:webowner /path/to/website<br />
find /path/to/website -type d | xargs chmod 700<br />
find /path/to/website -type f | xargs chmod 600 </code></p>
<p>And before you log out, might as well check your logs and make sure they are secured.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=56</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable APC on CentOS 5</title>
		<link>http://www.linuxpractice.com/?p=14</link>
		<comments>http://www.linuxpractice.com/?p=14#comments</comments>
		<pubDate>Thu, 05 Jan 2012 17:31:30 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[WebServer Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=14</guid>
		<description><![CDATA[Alternative PHP Cache or APC is an easy quick way to speed up almost any PHP based website. Setup only takes a few seconds and it comes complete with a monitoring and management GUI webpage. The software as an opcode cache, basically it keeps a copy of your compiled php scripts in memory eliminating the…]]></description>
			<content:encoded><![CDATA[<p>Alternative PHP Cache or APC is an easy quick way to speed up almost any PHP based website. Setup only takes a few seconds and it comes complete with a monitoring and management GUI webpage.  The software as an opcode cache, basically it keeps a copy of your compiled php scripts in memory eliminating the need to load and interpret each script each time is is called.  </p>
<p><strong>Install APC</strong></p>
<p><code>pecl install apc</code></p>
<p># NOTE: <i> You may need to install a specific version of apc, the pecl message will alert you which to install.</i></p>
<p><b>Check your apc install</b></p>
<p><code>php -r 'phpinfo();' |grep apc</code></p>
<p><b>Setup APC</b></p>
<p>Get max shared memory &#8220;shmmax.&#8221; This will give a return a number, eg.. 68</p>
<p><code>cat /proc/sys/kernel/shmmax</code></p>
<p>Edit apc.ini in /etc/php.d/apc.ini.  this example uses a shared memory size of 3x shmmax.</p>
<p><code>; Enable apc extension module<br />
extension=apc.so<br />
apc.shm_size=204M<br />
;apc.shm_segments=3</code></p>
<p>NOTE: If apc was compiled with mmap (Meopry Mapping) support, then you do not need to specify the ;apc.shm_segments parameter.  Make the apc.shm size a multiple of shmmax and make sure you append the G or M to end end to indicate size.</p>
<p>Restart Apache  </p>
<p><code>/etc/init.d/httpd graceful</code></p>
<p>Find apc.php and copy it to a website on your server, edit the password parameters at the beginning of the file.  Visit the website you intend to use APC on and browse around it to get as many pages as possible cached.  Then return to the apc.php page and see how much memory is beng used and how severe the fragmentation is.  If fragmentation is high, increate shm_size incrementally until you can visit all website pages with little to no fragmentation.</p>
<p>For more information on the Alternative PHP Cache (APC)<br />
to <a href="http://php.net/manual/en/book.apc.php">http://php.net/manual/en/book.apc.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=14</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache mod_deflate</title>
		<link>http://www.linuxpractice.com/?p=5</link>
		<comments>http://www.linuxpractice.com/?p=5#comments</comments>
		<pubDate>Sun, 18 Dec 2011 03:23:37 +0000</pubDate>
		<dc:creator>Linux</dc:creator>
				<category><![CDATA[WebServer Administration]]></category>

		<guid isPermaLink="false">http://www.linuxpractice.com/?p=5</guid>
		<description><![CDATA[The Apache HTTP server has the ability to compress content resulting in a huge savings in bandwidth and a dramatic increases in site speed. Content such as html, style sheets and javascript compress nicely and can give up to 80% savings in bandwidth. For example enabling mod_deflate reduces the size of jquery-ui-.custom.min.js from 205k to…]]></description>
			<content:encoded><![CDATA[<p>The Apache HTTP server has the ability to compress content resulting in a huge savings in bandwidth and a dramatic increases in site speed.  Content such as html, style sheets and javascript compress nicely and can give up to 80% savings in bandwidth.  For example enabling mod_deflate reduces the size of jquery-ui-<version>.custom.min.js from 205k to 45k.</p>
<p>Enabling mod_defalte only takes a few minutes.</p>
<p>In the apache configuration file, enable mod_deflate</p>
<p><code>vi /etc/httpd/conf/httpd.conf<br />
LoadModule deflate_module modules/mod_deflate.so</code><br />
In the websites virtual host file or section, enable mod_deflate</p>
<p><code>&lt;IfModule  mod_deflate.c&gt;<br />
# compress text, html, javascript, css, xml:<br />
AddOutputFilterByType DEFLATE text/plain<br />
AddOutputFilterByType DEFLATE text/html<br />
AddOutputFilterByType DEFLATE text/xml<br />
AddOutputFilterByType DEFLATE text/css<br />
AddOutputFilterByType DEFLATE text/javascript<br />
AddOutputFilterByType DEFLATE application/xml<br />
AddOutputFilterByType DEFLATE application/xhtml+xml<br />
AddOutputFilterByType DEFLATE application/rss+xml<br />
AddOutputFilterByType DEFLATE application/javascript<br />
AddOutputFilterByType DEFLATE application/x-javascript<br />
# dont compress already comptressed fiels<br />
SetOutputFilter DEFLATE<br />
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI .(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary<br />
SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary<br />
# old browsers that cannot handle it<br />
#BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
#BrowserMatch ^Mozilla/4\.0[678] no-gzip<br />
#BrowserMatch \bMSIE !no-gzip !gzip-only-text/html<br />
DeflateFilterNote ratio<br />
LogFormat '"%r" %b (%{ratio}n%%) "%{User-agent}i"' deflate<br />
CustomLog /var/log/httpd/deflate_log.log deflate<br />
&lt;/IfModule&gt;</code></p>
<p>Restart Apache</p>
<p><code>/etc/init/httpd graceful</code></p>
<p>Check log for errors.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.linuxpractice.com/?feed=rss2&#038;p=5</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

