<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>suphp &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/suphp/</link>
	<description>Feed of posts on WordPress.com tagged "suphp"</description>
	<pubDate>Sat, 02 Jan 2010 02:13:59 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Apache, suPHP and PHP oh my]]></title>
<link>http://projectesxi.wordpress.com/2009/12/14/apache-suphp-and-php-oh-my/</link>
<pubDate>Mon, 14 Dec 2009 20:30:42 +0000</pubDate>
<dc:creator>projectesxi</dc:creator>
<guid>http://projectesxi.wordpress.com/2009/12/14/apache-suphp-and-php-oh-my/</guid>
<description><![CDATA[Finally got a webserver running with PHP and suPHP. This took me a lot longer then I expected and re]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Finally got a webserver running with PHP and suPHP.  This took me a lot longer then I expected and reminded me of the old days of reading complicated documentation along with crazy errors.  In the end, I did get everything working.  As usual the following is what I did from an instructional point of view.  This was done using FreeBSD 7.2, so things might be slightly different depending on the distribution being used.</p>
<p>To get Apache go here:</p>
<p><a href="http://httpd.apache.org/">http://httpd.apache.org/</a></p>
<p>For PHP, go here:</p>
<p><a href="http://www.php.net/">http://www.php.net/</a></p>
<p>And to get suPHP go here:</p>
<p><a href="http://www.suphp.org">http://www.suphp.org</a></p>
<p>As a bit of explanation,  Apache is a free web-server that powers a lot of the Internet.  PHP is a nice scripting language that can be used to do a lot.  It can interface with MySQL, hence why I spend time getting that configured. Also, I do believe some of the addons I plan on working with will require both PHP and MySQL.  The last is suPHP which is for securing the PHP scripts.  It does this by making the scripts run as the user trying to run them. For the most part, I probably could have avoiding using suPHP since I may only run a few personal websites, but I was curious about it and it does seem to add another layer of security. </p>
<p>One of the bigger problems I had concerned compiling suPHP.  It kept saying that it couldn&#8217;t find apxs, even though the suPHP configure command asks for the path to apxs.  In the end installing Perl resolved that issue.</p>
<p>So the first two things that should be done is install the following from the FreeBSD Ports collection:</p>
<p>- libxml2<br />
- Perl 5.x or later</p>
<p>I had to log off and then log back in after installing Perl to get suPHP to compile right, but I&#8217;m not sure if that is what really resolved my problem.</p>
<p>Create a new user and group called apache by doing the following:</p>
<p><strong>pw groupadd apache<br />
pw useradd apache -c &#8220;Apache Server&#8221; -d /dev/null -g apache -s /sbin/nologin</strong></p>
<p>The first piece of software I installed was Apache and used the following configure options:</p>
<p><strong>./configure &#8211;prefix=/usr/local/apache22 \<br />
&#8211;with-perl \<br />
&#8211;enable-so \<br />
&#8211;enable-cache \<br />
&#8211;enable-disk-cache \<br />
&#8211;enable-rewrite \<br />
&#8211;enable-usertrack</strong></p>
<p>Do a make and make install.  You can install Apache anywhere, I just chose apache22 to remind myself roughly what version I had.</p>
<p>The next piece is PHP and I used the following configure options:</p>
<p><strong>./configure \<br />
&#8211;prefix=/usr/local/php \<br />
&#8211;with-mysql=/usr/local/mysql \<br />
&#8211;with-config-file-path=/etc \<br />
&#8211;enable-cgi \<br />
&#8211;enable-force-cgi-redirect \<br />
&#8211;enable-mbstring \<br />
&#8211;without-sqlite \<br />
&#8211;with-mysql-sock=/tmp/mysql</strong></p>
<p>Then do a make, make test and make install.  </p>
<p>The last step is suPHP and these are the configure options I used:</p>
<p><strong>./configure &#8211;prefix=/usr/local \<br />
&#8211;with-apache-user=apache \<br />
&#8211;with-apr=/usr/local/apache22/bin \<br />
&#8211;with-logfile=/var/log/suphp.log \<br />
&#8211;with-apxs=/usr/local/apache22/bin/apxs \<br />
&#8211;with-min-uid=500 \<br />
&#8211;with-min-gid=500</strong></p>
<p>Do a make and make install. With luck everything should have configured.</p>
<p>Here is the configuration that is placed in my /usr/local/apache22/conf directory:</p>
<p><a href='http://projectesxi.wordpress.com/files/2009/12/httpdconf.pdf'>http://projectesxi.wordpress.com/files/2009/12/httpdconf.pdf</a></p>
<p>For the PHP.ini file, I just copied the &#8220;php.ini-production&#8221; version from the src directory to the /etc directory.  I may come back later and edit the file, but for now it is working.</p>
<p>For the suphp.conf file, I used the following and placed it into the /etc directory:</p>
<p><a href='http://projectesxi.wordpress.com/files/2009/12/suphp_conf.pdf'>http://projectesxi.wordpress.com/files/2009/12/suphp_conf.pdf</a></p>
<p>With any luck running this command should get your Apache server going:</p>
<p><strong>/usr/local/apache22/bin/apachectl start</strong></p>
<p>With luck if you go to your server IP address you should get a page.  </p>
<p>The permissions to your public_html should be &#8220;701&#8243;.  The rest of the permissions in the public_html should be 604.  I did have an issue serving up my images directory so I had to set that directory permission to 701.</p>
<p>The only other thing I did was create a start-up script and add it to /usr/local/etc/rc.d with the following contents:</p>
<p><strong><br />
#!/bin/sh<br />
/usr/local/apache22/bin/apachectl start<br />
</strong></p>
<p>If you run into any problems, then /usr/local/apache22/logs are your friend.  </p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[DSO, suPHP, FCGI, CGI]]></title>
<link>http://amshameer.wordpress.com/2009/12/02/dso-suphp-fcgi-cgi/</link>
<pubDate>Wed, 02 Dec 2009 04:39:16 +0000</pubDate>
<dc:creator>Shameer A M</dc:creator>
<guid>http://amshameer.wordpress.com/2009/12/02/dso-suphp-fcgi-cgi/</guid>
<description><![CDATA[DSO &#8212; Provides PHP through libphp4.so or libphp5.so (aka, mod_php). This option is usually the]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">
<ul style="text-align:justify;">
<li><strong>DSO</strong> &#8212; Provides PHP through <code>libphp4.so</code> or <code>libphp5.so</code> (aka, <strong>mod_php</strong>). This option is usually the fastest way to execute PHP requests; however, this option uses the system user called “nobody” to serve all PHP requests. It is also important to note that if you wish to use both versions of PHP via DSO, you <strong>must</strong> apply the concurrent DSO patch at build time.</li>
<li> <strong>suPHP</strong> &#8212; Provides PHP through <strong>mod_suphp</strong>. Using this option is probably the most flexible way of serving PHP requests and is generally very secure. Under this option, PHP scripts will be executed by the user who owns the VirtualHost serving the request.</li>
<li> <strong>FCGI</strong> &#8212; This option serves PHP through <strong>mod_fcgid</strong>. This is a fast way of serving PHP requests but will most likely require that you tweak <code>php.conf</code>. You can enable suEXEC to execute PHP scripts under the user who owns the VirtualHost that is serving the request or, if suEXEC is disabled, PHP will be served by the system user “nobody.”
<ul>
<li> <strong>Important:</strong> This method is only recommended for advanced administrators who understand how to tune the performance of <strong>mod_fcgid</strong>. UserDir requests will not function correctly with the basic <strong>mod_fcgid</strong> setup.</li>
</ul>
</li>
<li> <strong>CGI</strong> &#8212; This option provides PHP through <strong>mod_cgi</strong> or <strong>mod_cgid</strong>. Using this option, you can enable suEXEC so that PHP scripts will be executed as the user who owns the VirtualHost that is serving the request. If suEXEC is disabled, the system user “nobody” will execute PHP scripts. UserDir requests will not function properly with the setup provided by cPanel.
<ul>
<li> This option is only intended as a fallback for when DSO or suPHP is <strong>not</strong> available. Serving PHP as CGI is not especially fast or secure, even if suEXEC is enabled.</li>
</ul>
</li>
</ul>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Configure suPHP on cPanel]]></title>
<link>http://webhostrepo.wordpress.com/2009/09/29/configure-suphp-on-cpanel/</link>
<pubDate>Tue, 29 Sep 2009 06:45:12 +0000</pubDate>
<dc:creator>webhostrepo</dc:creator>
<guid>http://webhostrepo.wordpress.com/2009/09/29/configure-suphp-on-cpanel/</guid>
<description><![CDATA[After installing suPHP and before changing the PHP handler from your default one to suPHP, there are]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>After installing suPHP and before changing the PHP handler from your default one to suPHP, there are a  few configuration options that need to be checked.</p>
<p>1) Check if the suPHP module is correctly loaded in the Apache configuration file.</p>
<p># LoadModule suphp_module libexec/mod_suphp.so</p>
<p>2) Run the below scripts to double check the server settings:</p>
<p># /scripts/postsuexecinstall</p>
<p># /scripts/chownpublichtmls</p>
<p>3) Lets check the permissions now. </p>
<p>If there are files with either 777 or 666 permission inside the document root, you are most likely to get Internal Server Errors.</p>
<p>find /home/*/public_html/ -perm 777 -exec ls {} \;<br />
find /home/*/public_html/ -perm 777 -exec ls {} \;</p>
<p>Set 755 and 644 respectively, for the files that gets listed in the above command.</p>
<p>4) Check the CGI scripts as well</p>
<p># /scripts/fixsuexeccgiscripts</p>
<p>5) Last but not the least, make sure that there are no php_flags in the domain&#8217;s .htaccess file.</p>
<p># grep -iRl php /home/*/public_html/.htaccess</p>
<p>If you want to use php flags for the domains, create a custom php.ini file and place it in the domain&#8217;s web root.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Дело было вечером: suPHP, Apache]]></title>
<link>http://mware.wordpress.com/2009/08/21/%d0%b4%d0%b5%d0%bb%d0%be-%d0%b1%d1%8b%d0%bb%d0%be-%d0%b2%d0%b5%d1%87%d0%b5%d1%80%d0%be%d0%bc-suphp-apache/</link>
<pubDate>Fri, 21 Aug 2009 12:54:44 +0000</pubDate>
<dc:creator>mware</dc:creator>
<guid>http://mware.wordpress.com/2009/08/21/%d0%b4%d0%b5%d0%bb%d0%be-%d0%b1%d1%8b%d0%bb%d0%be-%d0%b2%d0%b5%d1%87%d0%b5%d1%80%d0%be%d0%bc-suphp-apache/</guid>
<description><![CDATA[Прошлым вечером стало интересно, почему же там всё(скрипты на PHP, WordPress etc) прекрасно работают]]></description>
<content:encoded><![CDATA[Прошлым вечером стало интересно, почему же там всё(скрипты на PHP, WordPress etc) прекрасно работают]]></content:encoded>
</item>
<item>
<title><![CDATA[Ler arquivos PHP com extensões diferentes de .php, .php5 e demais - how to read extensions php]]></title>
<link>http://littleoak.wordpress.com/2009/04/01/ler-arquivos-php-com-extensoes-diferentes-de-php-php5-e-demais-how-to-read-extensions-php/</link>
<pubDate>Wed, 01 Apr 2009 19:40:07 +0000</pubDate>
<dc:creator>littleoak</dc:creator>
<guid>http://littleoak.wordpress.com/2009/04/01/ler-arquivos-php-com-extensoes-diferentes-de-php-php5-e-demais-how-to-read-extensions-php/</guid>
<description><![CDATA[Quando você tem um servidor em suPHP e gostaria que um cliente que estivesse com um arquivo php de e]]></description>
<content:encoded><![CDATA[Quando você tem um servidor em suPHP e gostaria que um cliente que estivesse com um arquivo php de e]]></content:encoded>
</item>
<item>
<title><![CDATA[Outra forma de mudar register_globals do PHP em seu dedicado]]></title>
<link>http://bsrsoft.wordpress.com/2008/12/04/outra-forma-de-mudar-register_globals-do-php-em-seu-dedicado/</link>
<pubDate>Thu, 04 Dec 2008 18:05:51 +0000</pubDate>
<dc:creator>BSRSoft IDC</dc:creator>
<guid>http://bsrsoft.wordpress.com/2008/12/04/outra-forma-de-mudar-register_globals-do-php-em-seu-dedicado/</guid>
<description><![CDATA[Com o Php em modo suPHP basta criar um arquivo php.ini na árvore de diretório do cliente com o segui]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p style="text-align:justify;">Com o Php em modo suPHP basta criar um arquivo php.ini na árvore de diretório do cliente com o seguinte teor:</p>
<p>register_globals = On</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Fixing File and Folder Permission on suPHP]]></title>
<link>http://piyecarane.wordpress.com/2008/08/19/fixing-file-and-folder-permission-on-suphp/</link>
<pubDate>Tue, 19 Aug 2008 00:31:26 +0000</pubDate>
<dc:creator>piyecarane</dc:creator>
<guid>http://piyecarane.wordpress.com/2008/08/19/fixing-file-and-folder-permission-on-suphp/</guid>
<description><![CDATA[Just for my own note After installing suPHP on server, execute : find /home/*/public_html -type d -e]]></description>
<content:encoded><![CDATA[Just for my own note After installing suPHP on server, execute : find /home/*/public_html -type d -e]]></content:encoded>
</item>

</channel>
</rss>
