<?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>x83.net &#187; Redhat</title>
	<atom:link href="http://www.x83.net/category/linux/redhat/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.x83.net</link>
	<description></description>
	<lastBuildDate>Tue, 31 Jan 2012 13:53:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Qmail SMTP Relay</title>
		<link>http://www.x83.net/qmail-smtp-relay/</link>
		<comments>http://www.x83.net/qmail-smtp-relay/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 12:05:00 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[qmail]]></category>
		<category><![CDATA[relay]]></category>
		<category><![CDATA[relayclient]]></category>
		<category><![CDATA[tcp.smtp]]></category>
		<category><![CDATA[tcprules]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=791</guid>
		<description><![CDATA[If you have a Qmail server and you want to allow a specific IP to send emails (relay) through Qmail all you have to do is to add in /etc/tcprules.d/tcp.smtp : IP:allow,RELAYCLIENT=&#8221;",RBLSMTPD=&#8221;",NOP0FCHECK=&#8221;0&#8243;,DKSIGN=&#8221;/var/qmail/control/domainkeys/domain.com/dkim1&#8243; Where IP is the IP of your remote email server. You can even specify something like : aaa.bbb.ccc.:allow,RELAYCLIENT=&#8221;" After this you have to [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a Qmail server and you want to allow a specific IP to send emails (relay) through Qmail all you have to do is to add in <em>/etc/tcprules.d/tcp.smtp</em> :</p>
<p><strong>IP:allow,RELAYCLIENT=&#8221;",RBLSMTPD=&#8221;",NOP0FCHECK=&#8221;0&#8243;,DKSIGN=&#8221;/var/qmail/control/domainkeys/domain.com/dkim1&#8243;</strong></p>
<p>Where IP is the IP of your remote email server. You can even specify something like : <strong>aaa.bbb.ccc.:allow,RELAYCLIENT=&#8221;"</strong></p>
<p>After this you have to run :</p>
<p><strong>tcprules /etc/tcprules.d/tcp.smtp.cdb /etc/tcprules.d/tcp.smtp.tmp < /etc/tcprules.d/tcp.smtp</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/qmail-smtp-relay/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Nginx + php 5.2.17 + php-fpm</title>
		<link>http://www.x83.net/nginx-php-5-2-17-php-fpm/</link>
		<comments>http://www.x83.net/nginx-php-5-2-17-php-fpm/#comments</comments>
		<pubDate>Thu, 04 Aug 2011 12:30:17 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[5.2.17]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php-fpm]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=778</guid>
		<description><![CDATA[Download the needed packages and store them in /usr/src: http://us.php.net/distributions/php-5.2.17.tar.gz http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz http://nginx.org/download/nginx-1.1.0.tar.gz Then run : tar -xvzf php-5.2.17.tar.gz gzip -cd php-5.2.17-fpm-0.5.14.diff.gz &#124; sudo patch -d php-5.2.17 -p1 cd php-5.2.17 ./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --enable-pdo --with-curl --disable-debug --with-pic --disable-rpath --enable-inline-optimization --with-bz2 --enable-xml --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --with-xsl --enable-zip --with-pcre-regex --with-gd --without-pdo-sqlite [...]]]></description>
			<content:encoded><![CDATA[<p>Download the needed packages and store them in /usr/src:</p>
<p>http://us.php.net/distributions/php-5.2.17.tar.gz</p>
<p>http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz</p>
<p>http://nginx.org/download/nginx-1.1.0.tar.gz</p>
<p>Then run :</p>
<p><code>tar -xvzf php-5.2.17.tar.gz<br />
gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | sudo patch -d php-5.2.17 -p1<br />
cd php-5.2.17<br />
./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --enable-pdo --with-curl --disable-debug --with-pic --disable-rpath --enable-inline-optimization --with-bz2 --enable-xml --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --with-xsl --enable-zip --with-pcre-regex --with-gd --without-pdo-sqlite --with-pdo-mysql --without-sqlite --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-mysql --enable-bcmath --enable-calendar --enable-exif --enable-ftp  --with-gettext --with-imap --with-mysqli --with-openssl --with-kerberos --with-imap-ssl --enable-dbase --with-gmp --enable-shmop --enable-wddx</p>
<p>make all install</code></p>
<p>Note that you can add &#8211;<strong>prefix </strong> to install the binaries in a different location than the default one.</p>
<p>After compilation is done :</p>
<p><code>strip /usr/local/bin/php-cgi<br />
cp sapi/cgi/fpm/php-fpm /etc/init.d/<br />
chmod +x /etc/init.d/php-fpm</p>
<p>cp /usr/src/php-5.2.17/php.ini-recommended /usr/local/lib/php.ini<br />
mkdir /etc/php/<br />
ln -s /usr/local/lib/php.ini /etc/php/php.ini<br />
ln -s /usr/local/etc/php-fpm.conf /etc/php/php-fpm.conf<br />
</code></p>
<p>Make sure you edit <strong>/etc/php/php-fpm.conf</strong> and set the proper user/group (and permissions if its the case).</p>
<p>Then compile Nginx:</p>
<p><code>tar zxvf nginx-1.1.0.tar.gz<br />
./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module<br />
make &#038;&#038; sudo make install<br />
</code></p>
<p>The same you can modify the <strong>&#8211;prefix</strong>  here.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/nginx-php-5-2-17-php-fpm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plesk 10 nginx reverse proxy configuration in front of Apache</title>
		<link>http://www.x83.net/plesk-10-nginx-reverse-proxy-configuration-in-front-of-apache/</link>
		<comments>http://www.x83.net/plesk-10-nginx-reverse-proxy-configuration-in-front-of-apache/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 12:40:14 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[httpdmng]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[plesk 10]]></category>
		<category><![CDATA[reverse proxy]]></category>
		<category><![CDATA[websrvmng]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=769</guid>
		<description><![CDATA[Plesk 10 nginx reverse proxy configuration On older Plesk version ( websrvmng &#8211;set-http-port &#8211;port=8080 Starting with Plesk 10 this is not so easy since you have to edit a php file called /usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php. In my case instead of : domain-&#62;physicalHosting-&#62;ipAddress-&#62;address ?&#62;:server-&#62;webserver-&#62;httpsPort : $VAR-&#62;server-&#62;webserver-&#62;httpPort ?&#62;&#62; ServerName "domain-&#62;asciiName ?&#62;:server-&#62;webserver-&#62;httpsPort : $VAR-&#62;server-&#62;webserver-&#62;httpPort ?&#62;" I&#8217;ve set : &#160; &#60;VirtualHost [...]]]></description>
			<content:encoded><![CDATA[<p>Plesk 10 nginx reverse proxy configuration</p>
<p>On older Plesk version (</p>
<p><strong>websrvmng &#8211;set-http-port &#8211;port=8080</strong></p>
<p>Starting with Plesk 10 this is not so easy since you have to edit a php file called <em>/usr/local/psa/admin/conf/templates/default/domain/domainVirtualHost.php</em>. In my case instead of :</p>
<p><code>domain-&gt;physicalHosting-&gt;ipAddress-&gt;address ?&gt;:<!--?php echo $OPT['ssl'] ? $VAR--->server-&gt;webserver-&gt;httpsPort : $VAR-&gt;server-&gt;webserver-&gt;httpPort ?&gt;&gt;<br />
ServerName "<!--?php echo $VAR--->domain-&gt;asciiName ?&gt;:<!--?php echo $OPT['ssl'] ? $VAR--->server-&gt;webserver-&gt;httpsPort : $VAR-&gt;server-&gt;webserver-&gt;httpPort ?&gt;"</code></p>
<p>I&#8217;ve set :</p>
<p>&nbsp;</p>
<p>&lt;VirtualHost &lt;?php echo $OPT['ipAddress']-&gt;escapedAddress ?&gt;:&lt;?php echo $OPT['ssl'] ? 8043 : 8080 ?&gt;&gt;<br />
ServerName &#8220;&lt;?php echo $VAR-&gt;domain-&gt;asciiName ?&gt;:&lt;?php echo $OPT['ssl'] ? 8043 : 8080 ?&gt;&#8221;</p>
<p><span style="font-family: monospace;"><br />
</span></p>
<p>Where 8043 will be the new https port and 8080 will be the http port.</p>
<p>After this change I had to run :</p>
<p><strong>/usr/local/psa/admin/bin/httpdmng &#8211;reconfigure-all</strong></p>
<p>Note that this is only for Plesk 10.x. On 9.x we used to have</p>
<p><strong>/usr/local/psa/admin/sbin/websrvmng &#8211;reconfigure-all</strong></p>
<p>After this make sure that the Apache server has set in its configuration files (/etc/httpd/conf/httpd.conf) Listen 8080 instead of Listen 80. Same thing for the /etc/httpd/conf.d/ssl.conf file, Listen 8043 instead of Listen 443.</p>
<p>Then you need to install nginx (yum install nginx) and download this zip file that these guys provided <a title="zip" href="http://www.grafxsoftware.com/download/nginx/nginx_setup.zip">http://www.grafxsoftware.com/download/nginx/nginx_setup.zip</a>. Furthermore you can check their <a title="Howto" href="http://www.grafxsoftware.com/faq.php/HOW-TO-configure-PLESK-with-NGinx-proxy-reverse/1/1/">http://www.grafxsoftware.com/faq.php/HOW-TO-configure-PLESK-with-NGinx-proxy-reverse/1/1/</a>.</p>
<p>Once downloaded run:</p>
<p><strong>sh generate_nginx_conf.sh</strong></p>
<p>Verify with &#8220;nginx -t&#8221; that there isn&#8217;t any error and finally restart the involved services :</p>
<p><strong>service httpd restart<br />
service nginx restart</strong></p>
<p>Make sure that 8043 and 8080 accept connections. (Note that its not necessary to change the https port).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/plesk-10-nginx-reverse-proxy-configuration-in-front-of-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Authentication Token Manipulation Error</title>
		<link>http://www.x83.net/authentication-token-manipulation-error/</link>
		<comments>http://www.x83.net/authentication-token-manipulation-error/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 11:00:40 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[manipulation]]></category>
		<category><![CDATA[token]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=743</guid>
		<description><![CDATA[You may get an error, such as Authentication Token Manipulation Error, while trying to change passwords for a user. For example: #passwd user Authentication Token Manipulation Error # This error is being produced because you are using shadowed password files and the shadow doesn’t have entry for this user. i.e, passwd file has an entry [...]]]></description>
			<content:encoded><![CDATA[<p>You may get an error, such as Authentication Token Manipulation Error, while trying to change passwords for a user. For example:</p>
<p><strong>#passwd user</strong><br />
Authentication Token Manipulation Error<br />
#</p>
<p>This error is being produced because you are using shadowed password files and the shadow doesn’t have entry for this user. i.e, <strong>passwd </strong>file  has an entry for this user, but <strong>shadow </strong>file doesn’t.</p>
<p>In order to resolve this, you can either add the entry manually or recreate the shadow file. You can use pwconv to recreate the shadow file. See the manpage for more details on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/authentication-token-manipulation-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to enable Status in apache</title>
		<link>http://www.x83.net/how-to-enable-status-in-apache/</link>
		<comments>http://www.x83.net/how-to-enable-status-in-apache/#comments</comments>
		<pubDate>Thu, 30 Jun 2011 10:49:17 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[httpd]]></category>
		<category><![CDATA[mod_status]]></category>
		<category><![CDATA[status]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=738</guid>
		<description><![CDATA[Add this to your httpd.conf file: ExtendedStatus On &#60;Location /server-status&#62; SetHandler server-status Order Deny,Allow Deny from all Allow from 127.0.0.1 &#60;/Location&#62;]]></description>
			<content:encoded><![CDATA[<p>Add this to your <strong>httpd.conf</strong> file:</p>
<p>ExtendedStatus On</p>
<p>&lt;Location /server-status&gt;<br />
    SetHandler server-status<br />
    Order Deny,Allow<br />
    Deny from all<br />
    Allow from 127.0.0.1<br />
&lt;/Location&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/how-to-enable-status-in-apache/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to clear SWAP</title>
		<link>http://www.x83.net/how-to-clear-swap/</link>
		<comments>http://www.x83.net/how-to-clear-swap/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 12:28:00 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[swap]]></category>
		<category><![CDATA[swapoff]]></category>
		<category><![CDATA[swapon]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=736</guid>
		<description><![CDATA[It happens for swap to be used from time to time : root@servcorp:~# free -m total used free shared buffers cached Mem: 4011 759 3252 0 4 53 -/+ buffers/cache: 702 3309 Swap: 8191 15 8176 To clear the swap run : root@servcorp:~# swapoff -a &#038;&#038; swapon -a And free shows : root@servcorp:~# free -m [...]]]></description>
			<content:encoded><![CDATA[<p>It happens for swap to be used from time to time :</p>
<p><strong>root@servcorp:~# free -m</strong><br />
             total       used       free     shared    buffers     cached<br />
Mem:          4011        759       3252          0          4         53<br />
-/+ buffers/cache:        702       3309<br />
Swap:         8191         15       8176</p>
<p>To clear the swap run :</p>
<p><strong>root@servcorp:~# swapoff -a &#038;&#038; swapon -a</strong></p>
<p>And <strong>free </strong>shows :</p>
<p><strong>root@servcorp:~# free -m</strong><br />
             total       used       free     shared    buffers     cached<br />
Mem:          4011        746       3265          0          4         55<br />
-/+ buffers/cache:        686       3325<br />
Swap:         8191          0       8191</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/how-to-clear-swap/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to clear cached RAM</title>
		<link>http://www.x83.net/how-to-clear-cached-ram/</link>
		<comments>http://www.x83.net/how-to-clear-cached-ram/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 12:23:56 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[cached]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[drop_caches]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[sync]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=733</guid>
		<description><![CDATA[sync; echo 3 > /proc/sys/vm/drop_caches; echo 0 > /proc/sys/vm/drop_caches; sync]]></description>
			<content:encoded><![CDATA[<p><strong>sync; echo 3 > /proc/sys/vm/drop_caches; echo 0 > /proc/sys/vm/drop_caches; sync</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/how-to-clear-cached-ram/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Install ruby on cPanel</title>
		<link>http://www.x83.net/install-ruby-on-cpanel/</link>
		<comments>http://www.x83.net/install-ruby-on-cpanel/#comments</comments>
		<pubDate>Tue, 28 Jun 2011 20:24:36 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[installruby]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=731</guid>
		<description><![CDATA[Under cPanel 11 you can install Ruby by running /scripts/installruby. This will install both ruby and rubygems. root@main [~]# ruby -v ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux] root@main [~]# gem list *** LOCAL GEMS *** actionmailer (2.3.11) actionpack (2.3.11) activerecord (2.3.11) activeresource (2.3.11) activesupport (2.3.11) cgi_multipart_eof_fix (2.5.0) daemons (1.1.4) fastthread (1.0.7) gem_plugin (0.2.3) mongrel (1.1.5) [...]]]></description>
			<content:encoded><![CDATA[<p>Under cPanel 11 you can install Ruby by running <strong>/scripts/installruby</strong>. This will install both ruby and rubygems.</p>
<p><strong>root@main [~]# ruby -v</strong><br />
ruby 1.8.7 (2011-02-18 patchlevel 334) [i686-linux]</p>
<p><strong>root@main [~]# gem list</strong></p>
<p>*** LOCAL GEMS ***</p>
<p>actionmailer (2.3.11)<br />
actionpack (2.3.11)<br />
activerecord (2.3.11)<br />
activeresource (2.3.11)<br />
activesupport (2.3.11)<br />
cgi_multipart_eof_fix (2.5.0)<br />
daemons (1.1.4)<br />
fastthread (1.0.7)<br />
gem_plugin (0.2.3)<br />
mongrel (1.1.5)<br />
rack (1.1.2)<br />
rails (2.3.11)<br />
rake (0.9.2)<br />
rubygems-update (1.8.5)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/install-ruby-on-cpanel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yum and RPM Tricks</title>
		<link>http://www.x83.net/yum-and-rpm-tricks/</link>
		<comments>http://www.x83.net/yum-and-rpm-tricks/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 20:06:48 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[cpio]]></category>
		<category><![CDATA[rpm]]></category>
		<category><![CDATA[rpm2cpio]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=701</guid>
		<description><![CDATA[This applies to Centos 5.6 but most likely it works on any rpm based distro. 1. It happened many times to mess the permissions of a file and services not to work properly. In order to get fixed I run : rpm -qf /path/to/file rpm -ql Lists all files from a package. This should show [...]]]></description>
			<content:encoded><![CDATA[<p>This applies to Centos 5.6 but most likely it works on any rpm based distro.</p>
<p>1. It happened many times to mess the permissions of a file and services not to work properly. In order to get fixed I run :</p>
<p><code>rpm -qf /path/to/file</code></p>
<p><code>rpm -ql
<package)name></code>  Lists all files from a package.</p>
<p>This should show the package that contains the modified file. Then I run :</p>
<p><code>rpm --setperms
<packagename></code></p>
<p>Also this command should show a list of modified files within a package:</p>
<p><code>rpm -V
<packagename></code></p>
<p>2. To view the Changelog:</p>
<p><code>rpm -q --changelog
<packagename> | less</code></p>
<p>3. View package based on repo:</p>
<p><code>rpm -qa release="*rf*"</code></p>
<p>4. Extract just one File:</p>
<p><code>rpm2cpio logrotate-1.0-1.i386.rpm |cpio -ivd etc/logrotate.conf</code></p>
<p>5. Query Package Install Order and Dates</p>
<p><code>rpm -qa --last >~/RPMS_by_Install_Date</code></p>
<p>6. Query Available Packages from a Repo</p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/yum-and-rpm-tricks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using mod_proxy in Plesk to redirect to a different site</title>
		<link>http://www.x83.net/using-mod_proxy-in-plesk-to-redirect-to-a-different-site/</link>
		<comments>http://www.x83.net/using-mod_proxy-in-plesk-to-redirect-to-a-different-site/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 07:10:40 +0000</pubDate>
		<dc:creator>Giany</dc:creator>
				<category><![CDATA[Centos]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Redhat]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[mod_proxy]]></category>
		<category><![CDATA[plesk]]></category>
		<category><![CDATA[proxypass]]></category>
		<category><![CDATA[proxypassreverse]]></category>
		<category><![CDATA[websrvmng]]></category>

		<guid isPermaLink="false">http://www.x83.net/?p=697</guid>
		<description><![CDATA[Scenario: Site1 : www.site.com Site2 : shop.site2.com The idea is to make a proxy redirect so if I access www.site.com/shop to be redirected to shop.site2.com and keep the URL in the browser. This can be done either by using mod_rewrite (if both sites are on the same server) or by using mod_proxy. In my case [...]]]></description>
			<content:encoded><![CDATA[<p>Scenario:</p>
<p>Site1 : www.site.com<br />
Site2 : shop.site2.com</p>
<p>The idea is to make a proxy redirect so if I access www.site.com/shop to be redirected to shop.site2.com and keep the URL in the browser.<br />
This can be done either by using mod_rewrite (if both sites are on the same server) or by using mod_proxy. In my case I had to do this on a Plesk server.</p>
<p>I&#8217;ve created in /var/www/vhosts/site.com/conf a file called <strong>vhost.conf </strong>that contains:</p>
<p><code>ProxyRequests off<br />
Order deny,allow<br />
Allow from all<br />
</code></p>
<p><code>ProxyPass /shop http://shop.site2.com<br />
ProxyPassReverse /shop http://shop.site2.com<br />
SetEnv force-proxy-request-1.0 1<br />
SetEnv proxy-nokeepalive 1</p>
<p></code></p>
<p><code><br />
Order allow,deny<br />
Allow from all</p>
<p></code></p>
<p>Then I ran:</p>
<p><code>/usr/local/psa/admin/bin/websrvmng -a -v</code></p>
<p>Verify httpd.include to see if there is any Include directive.</p>
<p>Now if you go to www.site.com/shop/ you should be redirected to shop.site2.com. Notice the trailing slash after (../shop/). That needs to be there otherwise it won&#8217;t load the images properly.</p>
<p>This can be fixed by adding in vhost.conf a Rewrite rule like:<br />
<code>RewriteEngine on</code><br />
<code>RewriteRule ^/shop$ /shop/ [R]</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.x83.net/using-mod_proxy-in-plesk-to-redirect-to-a-different-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

