<?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>Black-Pixel &#187; Server</title>
	<atom:link href="http://black-pixel.net/tag/server/feed" rel="self" type="application/rss+xml" />
	<link>http://black-pixel.net</link>
	<description>A geeks world</description>
	<lastBuildDate>Thu, 28 Mar 2013 15:18:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=191</generator>
	<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2F&amp;language=en_US&amp;category=text&amp;title=Black-Pixel&amp;description=A+geeks+world&amp;tags=blog" type="text/html" />
		<item>
		<title>Chrooted SFTP Without Shell Access</title>
		<link>http://black-pixel.net/chrooted-sftp-without-shell-access.html</link>
		<comments>http://black-pixel.net/chrooted-sftp-without-shell-access.html#comments</comments>
		<pubDate>Sun, 20 May 2012 14:55:45 +0000</pubDate>
		<dc:creator>Pixel</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://black-pixel.net/?p=846</guid>
		<description><![CDATA[<p>Sometimes you may need to give someone access to load files onto your server. I personally don't like FTP because it's insecure und frankly I don't want to set up a FTP-Server just for that. The problem with SFTP is that the user can look through your folders and has shell access. This is a tutorial on how to setup a chrooted SFTP account without shell access.  <a href="http://black-pixel.net/chrooted-sftp-without-shell-access.html">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://black-pixel.net/chrooted-sftp-without-shell-access.html">Chrooted SFTP Without Shell Access</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>Sometimes you may need to give someone access to load files onto your server. I don&#8217;t like FTP because it&#8217;s insecure and frankly I don&#8217;t want to set up a FTP server just for that. The problem with SFTP is that the user can look through your folders and has shell access. To solve this, I&#8217;ve written this tutorial on how to set up a chrooted SFTP account without shell access.<br />
<span id="more-846"></span><br />
First of all, edit the file <span style="background-color: #c0c0c0;"><em>/etc/ssh/sshd_config</em></span> and add/change the following:</p>
<pre class="brush:shell">#Subsystem sftp /usr/lib/openssh/sftp-server
Subsystem sftp internal-sftp

Match Group sftp
        ChrootDirectory %h
        ForceCommand internal-sftp
        AllowTcpForwarding no</pre>
<p>The first line changes the SFTP-Subsystem to the internal SFTP-Server which is better for chrooting.<br />
The second line (Match Group sftp) causes the lines below to only affect users in the sftp usergroup.<br />
ChrootDirectory %h binds the users to their home directory so they can&#8217;t see what&#8217;s outside.<br />
The next line forces internal-sftp and the last one disables TCP forwarding.</p>
<p>That&#8217;s it.</p>
<p>Now you have to create a user with the appropriate settings.</p>
<pre class="brush:shell">groupadd sftp

useradd -d /path/to/the/sftp/folder -s /bin/false -G sftp Username

passwd Username</pre>
<p>There is one more thing you have to care about. The home folder of this user has to be owned by root, else you won&#8217;t be able to login. Then you can create an upload folder for the user. For example:</p>
<pre class="brush:shell">chown root:root /path/to/sftp/folder
mkdir /path/to/sftp/folder/uploads
chown Username:Username /path/to/sftp/folder/uploads</pre>
<p>I found most of the information about this at this German blog: <a href="http://madapez.com/it/linux/howto-chroot-sftp-zugang-openssh-ohne-shell-ssh/">http://madapez.com/it/linux/howto-chroot-sftp-zugang-openssh-ohne-shell-ssh/</a></p>
<p>The post <a href="http://black-pixel.net/chrooted-sftp-without-shell-access.html">Chrooted SFTP Without Shell Access</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p> <p><a href="http://black-pixel.net/?flattrss_redirect&amp;id=846&amp;md5=f996f4c3aa9efe430214ea4b0b465ef7" title="Flattr" target="_blank"><img src="http://black-pixel.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://black-pixel.net/chrooted-sftp-without-shell-access.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2Fchrooted-sftp-without-shell-access.html&amp;language=en_GB&amp;category=text&amp;title=Chrooted+SFTP+Without+Shell+Access&amp;description=Sometimes+you+may+need+to+give+someone+access+to+load+files+onto+your+server.+I+don%26%238217%3Bt+like+FTP+because+it%26%238217%3Bs+insecure+and+frankly+I+don%26%238217%3Bt+want+to+set+up+a...&amp;tags=CentOS%2CLinux%2CServer%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Mailman with Postfix and Nginx on CentOS 6</title>
		<link>http://black-pixel.net/mailman-with-postfix-and-nginx-on-centos-6.html</link>
		<comments>http://black-pixel.net/mailman-with-postfix-and-nginx-on-centos-6.html#comments</comments>
		<pubDate>Fri, 24 Feb 2012 21:47:50 +0000</pubDate>
		<dc:creator>Pixel</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Mailman]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://black-pixel.net/?p=793</guid>
		<description><![CDATA[<p>In this tutorial I will show you how to set up Mailman with Postfix and Nginx on CentOS 6. I assume you have already set up Nginx to server CGI scripts using fcgiwrap like I've shown you in the previous post. <a href="http://black-pixel.net/mailman-with-postfix-and-nginx-on-centos-6.html">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://black-pixel.net/mailman-with-postfix-and-nginx-on-centos-6.html">Mailman with Postfix and Nginx on CentOS 6</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In this tutorial I will show you how to set up Mailman with Postfix and Nginx on CentOS 6. I assume you have already set up Nginx to server CGI scripts using fcgiwrap like I&#8217;ve shown you in the previous post.</p>
<p>Here is the link: http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html</p>
<p>I also presuppose that you have a working Postfix configuration.<br />
<span id="more-793"></span><br />
&nbsp;</p>
<p>The first step is to install Mailman.</p>
<pre class="brush:shell">yum install mailman</pre>
<p>Next you have to edit your <span style="background-color: #c0c0c0;">/usr/lib/mailman/Mailman/Defaults.py</span> and change the <span style="background-color: #c0c0c0;">DEFAULT_URL_PATTERN</span>.</p>
<pre class="brush:shell">DEFAULT_URL_PATTERN = 'http://%s/mailman/cgi-bin/'</pre>
<p>This is the same hierarchy as in the directory at <span style="background-color: #c0c0c0;">/usr/lib</span>.</p>
<p>Next download this script: http://black-pixel.net/stuff/postfix-to-mailman.tar</p>
<p>Extract the postfix-to-mailman.py into the folder <span style="background-color: #c0c0c0;">/usr/lib/mailman/bin/</span>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>As a next step, you&#8217;ll have to create a Nginx configuration.</p>
<pre class="brush:shell">vim /etc/nginx/conf.d/lists.example.conf</pre>
<p>Add the following lines and adjust you domain:</p>
<pre class="brush:shell">server {
    server_name  lists.exmaple.com;                   # your domain name

        location /mailman/cgi-bin {
               root /usr/lib;
               fastcgi_split_path_info (^/mailman/cgi-bin/[^/]*)(.*)$;
               include /etc/nginx/fastcgi_params;
               fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
               fastcgi_param PATH_INFO $fastcgi_path_info;
               fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
               fastcgi_intercept_errors on;
               fastcgi_pass unix:/var/run/fcgiwrap.socket;
        }

        location /images/mailman {
               alias /usr/share/images/mailman;
        }

        location /pipermail {
               alias /var/lib/mailman/archives/public;
               autoindex on;
        }
}</pre>
<p>That&#8217;s it for Nginx, don&#8217;t forget to restart it.</p>
<p>&nbsp;</p>
<p>The last thing we have to take care of is the Postfix configuration.</p>
<pre class="brush:shell">postconf -e 'relay_domains = lists.example.com'
postconf -e 'mailman_destination_recipient_limit = 1'</pre>
<p>Make sure your local IPv6 adress is at <span style="background-color: #c0c0c0;">mydestinations =</span> in your <span style="background-color: #c0c0c0;">main.cf</span> because mailman seems to use it for sending mails.</p>
<pre class="brush:shell">mydestinations = 127.0.0.1/8, [::1]/128</pre>
<p>&nbsp;</p>
<p>Next edit the <span style="background-color: #c0c0c0;">master.cf</span> file and add the following to the bottom:</p>
<pre>mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list(i used mailman) argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}</pre>
<p>Now we need a transport map:</p>
<pre class="brush:shell">postconf -e 'transport_maps = hash:/etc/postfix/transport'</pre>
<p>Edit the new transport file and add the following line:</p>
<pre class="brush:shell">lists.example.com mailman:</pre>
<p>After that:</p>
<pre class="brush:shell">postmap -v /etc/postfix/transport
service postfix restart</pre>
<p>&nbsp;</p>
<p>You&#8217;re nearly done, add the defaul mailing list called mailman:</p>
<pre class="brush:shell">/usr/lib/mailman/bin/newlist --urlhost=lists.example.com --emailhost=lists.example.com mailman</pre>
<p>Edit your aliases file as told and execute <span style="background-color: #c0c0c0;">newaliases</span> and <span style="background-color: #c0c0c0;">postfix restart</span>.</p>
<p>Now you can do the same for any mailing list you want to create.</p>
<p>After that start Mailman and add it to chkconfig.</p>
<pre class="brush:shell">service mailman start
chkconfig -–levels 2345 mailman on</pre>
<p>You can access the Mailman list page at <span style="background-color: #c0c0c0;">lists.example.com/mailman/cgi-bin/listinfo</span>.</p>
<p>&nbsp;</p>
<p>If you have any problems feel free to write a comment and I will try to help you asap. I&#8217;m not 100 percent sure if I&#8217;ve written everything necessary as I had to tweak around a lot to make it work.</p>
<p>The post <a href="http://black-pixel.net/mailman-with-postfix-and-nginx-on-centos-6.html">Mailman with Postfix and Nginx on CentOS 6</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p> <p><a href="http://black-pixel.net/?flattrss_redirect&amp;id=793&amp;md5=786abd5993193059f02863ac1236495c" title="Flattr" target="_blank"><img src="http://black-pixel.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://black-pixel.net/mailman-with-postfix-and-nginx-on-centos-6.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2Fmailman-with-postfix-and-nginx-on-centos-6.html&amp;language=en_GB&amp;category=text&amp;title=Mailman+with+Postfix+and+Nginx+on+CentOS+6&amp;description=In+this+tutorial+I+will+show+you+how+to+set+up+Mailman+with+Postfix+and+Nginx+on+CentOS+6.+I+assume+you+have+already+set+up+Nginx+to+server+CGI...&amp;tags=CentOS%2CLinux%2CMailman%2CNginx%2CServer%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Serving CGI Scripts with Nginx on CentOS 6</title>
		<link>http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html</link>
		<comments>http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html#comments</comments>
		<pubDate>Fri, 24 Feb 2012 12:23:36 +0000</pubDate>
		<dc:creator>Pixel</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://black-pixel.net/?p=783</guid>
		<description><![CDATA[<p>In this post I will show you how to serve CGI scripts with Nginx on CentOS 6 using fcgiwrap.  <a href="http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html">Serving CGI Scripts with Nginx on CentOS 6</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In this post I will show you how to serve CGI scripts with Nginx on CentOS 6 using fcgiwrap.</p>
<p>&nbsp;<span id="more-783"></span></p>
<p>As there&#8217;s no fcgiwrap package for CentOS 6.0, you must build it yourself. First install some prerequisites:</p>
<pre class="brush:shell">yum groupinstall 'Development Tools'

yum install fcgi-devel</pre>
<p>Now you can build fcgiwrap:</p>
<pre class="brush:shell">cd /usr/local/src/
git clone git://github.com/gnosek/fcgiwrap.git
cd fcgiwrap
autoreconf -i
./configure
make
make install</pre>
<p>This installs fcgiwrap to /usr/local/sbin/fcgiwrap.</p>
<p>&nbsp;</p>
<p>1a:</p>
<p style="padding-left: 30px;">Install the spawn-fcgi package which allows you to run fcgiwrap as a daemon:</p>
<pre class="brush:shell" style="padding-left: 30px;">yum install spawn-fcgi</pre>
<p>&nbsp;</p>
<p>1b:</p>
<p style="padding-left: 30px;">If you are already using spawn-fcgi for php, copy the init.d script and sysconfig of spawn-fcgi</p>
<pre class="brush:shell" style="padding-left: 30px;">cp -R /etc/init.d/spawn-fcgi /etc/init.d/spawn-fcgi2

cp -R /etc/sysconfig/spawn-fcgi /etc/sysconfig/spawn-fcgi2</pre>
<p style="padding-left: 30px;">Next change the following lines in your spawn-fcgi2 file in <span style="background-color: #c0c0c0;">/etc/init.d/</span> to look like this:</p>
<pre class="brush:shell" style="padding-left: 30px;">prog="spawn-fcgi2"
config="/etc/sysconfig/spawn-fcgi2"</pre>
<p>&nbsp;</p>
<p>Then modify your new spawn-fcgi configuration in <span style="background-color: #c0c0c0;">/etc/sysconfig/</span>to look like this:</p>
<pre class="brush:shell">FCGI_SOCKET=/var/run/fcgiwrap.socket
FCGI_PROGRAM=/usr/local/sbin/fcgiwrap
FCGI_USER=nginx
FCGI_GROUP=nginx
FCGI_EXTRA_OPTIONS="-M 0700"
OPTIONS="-u $FCGI_USER -g $FCGI_GROUP -s $FCGI_SOCKET -S $FCGI_EXTRA_OPTIONS -F 1 -P /var/run/spawn-fcgi.pid -- $FCGI_PROGRAM"</pre>
<p>&nbsp;</p>
<p>Now you can start it like any other service. Don&#8217;t forget to add it to chkconfig via <span style="background-color: #c0c0c0;">chkconfig &#8211;levels 2345 spawn-fcgi on</span>. (or <span style="background-color: #c0c0c0;">chkconfig &#8211;levels 2345 spawn-fcgi<strong>2</strong> on</span> depending on your configuration)</p>
<p>&nbsp;</p>
<p>The last thing you need to do is to write the nginx configuration.</p>
<pre class="brush:shell">location /cgi-bin/ {
gzip off;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
include /etc/nginx/fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}</pre>
<pre class="brush:shell"></pre>
<p>If you want to user another method, visit <a href="http://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-debian-squeeze-ubuntu-11.04">http://www.howtoforge.com/serving-cgi-scripts-with-nginx-on-debian-squeeze-ubuntu-11.04</a>.</p>
<p>The post <a href="http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html">Serving CGI Scripts with Nginx on CentOS 6</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p> <p><a href="http://black-pixel.net/?flattrss_redirect&amp;id=783&amp;md5=57451897cf098c86be8d332533826b37" title="Flattr" target="_blank"><img src="http://black-pixel.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://black-pixel.net/serving-cgi-scripts-with-nginx-on-centos-6.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2Fserving-cgi-scripts-with-nginx-on-centos-6.html&amp;language=en_GB&amp;category=text&amp;title=Serving+CGI+Scripts+with+Nginx+on+CentOS+6&amp;description=In+this+post+I+will+show+you+how+to+serve+CGI+scripts+with+Nginx+on+CentOS+6+using+fcgiwrap.+%26nbsp%3B+As+there%26%238217%3Bs+no%C2%A0fcgiwrap%C2%A0package+for+CentOS+6.0%2C+you+must+build+it...&amp;tags=CentOS%2CLinux%2CNginx%2CServer%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Nginx with PHP on CentOS 6</title>
		<link>http://black-pixel.net/nginx-with-php-on-centos-6.html</link>
		<comments>http://black-pixel.net/nginx-with-php-on-centos-6.html#comments</comments>
		<pubDate>Sun, 19 Feb 2012 16:07:33 +0000</pubDate>
		<dc:creator>Pixel</dc:creator>
				<category><![CDATA[Server]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Nginx]]></category>

		<guid isPermaLink="false">http://black-pixel.net/?p=797</guid>
		<description><![CDATA[<p>This is a post on how to set up Nginx with PHP using spawn-fcgi on CentOS 6. <a href="http://black-pixel.net/nginx-with-php-on-centos-6.html">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://black-pixel.net/nginx-with-php-on-centos-6.html">Nginx with PHP on CentOS 6</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This is a post on how to set up Nginx with PHP using spawn-fcgi on CentOS 6.</p>
<p>&nbsp;<span id="more-797"></span></p>
<p>If you haven&#8217;t already done it, you have to set up the EPEL repository.</p>
<p>For 32bit:</p>
<pre class="brush:shell">rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/i386/epel-release-6-5.noarch.rpm</pre>
<p>For 64bit:</p>
<pre class="brush:shell">rpm -Uvh http://download.fedora.redhat.com/pub/epel/6/x86_64/epel-release-6-5.noarch.rpm</pre>
<p>&nbsp;</p>
<p>Next install Nginx and spawn-fcgi, I assume you have already installed PHP and all the modules you need.</p>
<pre class="brush:shell">yum install nginx spawn-fcgi</pre>
<p>Now it&#8217;s time for the spawn-fcgi configuration. The config should be at <span style="background-color: #c0c0c0;">/etc/sysconfig/spawn-fcgi</span>.</p>
<pre class="brush:shell">vim /etc/sysconfig/spawn-fcgi</pre>
<pre class="brush:shell"># You must set some working options before the "spawn-fcgi" service will work.
# If SOCKET points to a file, then this file is cleaned up by the init script.
#
# See spawn-fcgi(1) for all possible options.
#
# Example :
#SOCKET=/var/run/php-fcgi.sock
OPTIONS="-a 127.0.0.1 -p 9000 -u nginx -g nginx -C 32 -F 1 -P /var/run/spawn-fcgi.pid -- /usr/bin/php-cgi"</pre>
<p>It&#8217;s very important that you remember the port, you&#8217;ll have to set the same in the nginx configuration. You should also use the same username and group as nginx.<br />
To play it safe, make sure the following line is not commented in the file <span style="background-color: #c0c0c0;">/etc/init.d/spawn-fcgi</span>:</p>
<pre class="brush:shell">config="/etc/sysconfig/spawn-fcgi"</pre>
<p>Now let&#8217;s make sure that spawn-fcgi and nginx automatically start after a reboot.</p>
<pre class="brush:shell">chkconfig --level 2345 nginx on
chkconfig --level 2345 spawn-fcgi on</pre>
<p>For more information about chkconfig check this site: <a href="http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-services-chkconfig.html">http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-services-chkconfig.html</a></p>
<p>Next up we have to fix a folder permission. The group of the session cookies folder, the address can be found in the php.ini (session.save_path = &#8220;/var/lib/php/session&#8221;). The folder group has to be changed from apache to whatever you use, e. g. nginx. You should check this after every php update.</p>
<p>As a last step, just add the following line to the <span style="background-color: #c0c0c0;">/etc/nginx.conf</span> and/or your custom domain configuration in <span style="background-color: #c0c0c0;">/etc/nginx/conf.d/yourdomain.conf</span>.</p>
<pre class="brush:shell">location ~ \.php$ {
                include        fastcgi_params;
                fastcgi_pass   localhost:9000;
                fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        }</pre>
<p>You should also make some additional changes in your configuration. I&#8217;m going to make another post about some of the settings.</p>
<p>The official wiki is always a good source for help:&nbsp;<a href="http://wiki.nginx.org/Configuration">http://wiki.nginx.org/Configuration</a></p>
<p>The post <a href="http://black-pixel.net/nginx-with-php-on-centos-6.html">Nginx with PHP on CentOS 6</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p> <p><a href="http://black-pixel.net/?flattrss_redirect&amp;id=797&amp;md5=6a379097c9c5a7aa234089aafbe7c403" title="Flattr" target="_blank"><img src="http://black-pixel.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://black-pixel.net/nginx-with-php-on-centos-6.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2Fnginx-with-php-on-centos-6.html&amp;language=en_GB&amp;category=text&amp;title=Nginx+with+PHP+on+CentOS+6&amp;description=This+is+a+post+on+how+to+set+up+Nginx+with+PHP+using+spawn-fcgi+on+CentOS+6.+%26nbsp%3B+If+you+haven%26%238217%3Bt+already+done+it%2C+you+have+to+set+up+the...&amp;tags=CentOS%2CLinux%2CNginx%2CServer%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Ram device with TmpFS</title>
		<link>http://black-pixel.net/ram-device-with-tmpfs.html</link>
		<comments>http://black-pixel.net/ram-device-with-tmpfs.html#comments</comments>
		<pubDate>Wed, 21 Sep 2011 16:58:15 +0000</pubDate>
		<dc:creator>Pixel</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Server]]></category>
		<category><![CDATA[ram device]]></category>

		<guid isPermaLink="false">http://black-pixel.net/?p=700</guid>
		<description><![CDATA[<p>In the last post I've showed you how to set up a ram device using ramdisk  (e.g. /dev/ram0). Now I'll show you how to create a ram device with tmpfs. This is especially necessary if you are on a VServer and therefore can't increase the size of the ramdisks. <a href="http://black-pixel.net/ram-device-with-tmpfs.html">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://black-pixel.net/ram-device-with-tmpfs.html">Ram device with TmpFS</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>In the last post I&#8217;ve showed you how to set up a ram device using ramdisk  (e.g. /dev/ram0). Now I&#8217;ll show you how to create a ram device with tmpfs. This is especially necessary if you are on a VServer and therefore can&#8217;t increase the size of the ramdisk.</p>
<p><span style="font-size: medium;">TmpFS</span></p>
<p>This is how you mount a tmpfs volume with 128MB space:</p>
<pre style="padding-left: 30px;"># mkdir -p /mnt/tmp
# mount -t tmpfs -o size=128m tmpfs /mnt/tmp</pre>
<p>If you don&#8217;t set the size, it will use 50% of the available memory. You can set the size as a normal value (size=128[k,m,g]) or as a percentage value (size=20%).</p>
<p>If you want to see if it worked or how much of the device is used, use the command <span style="background-color: #c0c0c0;">df -k</span>.</p>
<p>In my opinion, this is the best method to set up a ram device. There is also ramfs, on which tmpfs is based on, but I don&#8217;t recommend it.</p>
<p>&nbsp;</p>
<p>Don&#8217;t forget that you will loose all the data on the ram device if the computer reboots or crashes, so make sure you do regular backups.</p>
<p>&nbsp;</p>
<p>For more information, check out this link:</p>
<ul>
<li><a href="http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/">http://www.thegeekstuff.com/2008/11/overview-of-ramfs-and-tmpfs-on-linux/</a></li>
</ul>
<p>The post <a href="http://black-pixel.net/ram-device-with-tmpfs.html">Ram device with TmpFS</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p> <p><a href="http://black-pixel.net/?flattrss_redirect&amp;id=700&amp;md5=46046be30b0994c73570ea6b77133255" title="Flattr" target="_blank"><img src="http://black-pixel.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://black-pixel.net/ram-device-with-tmpfs.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2Fram-device-with-tmpfs.html&amp;language=en_GB&amp;category=text&amp;title=Ram+device+with+TmpFS&amp;description=In+the+last+post+I%26%238217%3Bve+showed+you+how+to+set+up+a+ram+device+using+ramdisk+%C2%A0%28e.g.+%2Fdev%2Fram0%29.+Now+I%26%238217%3Bll+show+you+how+to+create+a+ram+device+with+tmpfs....&amp;tags=ram+device%2CServer%2Cblog" type="text/html" />
	</item>
		<item>
		<title>Configure Vsftpd to use FTPS</title>
		<link>http://black-pixel.net/configure-vsftpd-to-use-ftps.html</link>
		<comments>http://black-pixel.net/configure-vsftpd-to-use-ftps.html#comments</comments>
		<pubDate>Tue, 02 Aug 2011 21:52:29 +0000</pubDate>
		<dc:creator>Pixel</dc:creator>
				<category><![CDATA[Server]]></category>

		<guid isPermaLink="false">http://black-pixel.net/?p=601</guid>
		<description><![CDATA[<p>This is a little HOWTO on configuring Vsftpd to use <strong>FTP</strong> over <strong>S</strong>SL and FTPS only, which is highly recommended. You can use it to upgrade Wordpress and install plugins, for example. <a href="http://black-pixel.net/configure-vsftpd-to-use-ftps.html">Continue reading <span class="meta-nav">&#8594;</span></a></p><p>The post <a href="http://black-pixel.net/configure-vsftpd-to-use-ftps.html">Configure Vsftpd to use FTPS</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p>]]></description>
				<content:encoded><![CDATA[<p>This is a little HOWTO on configuring Vsftpd to use <strong>FTP</strong> over <strong>S</strong>SL and FTPS only, which is highly recommended. You can use it to upgrade WordPress and install plugins, for example.</p>
<p>First open your <span style="background-color: #c0c0c0;">vsftpd.conf</span>, it should be located in <span style="background-color: #c0c0c0;">/etc/</span>.</p>
<p>Now add the following lines to enable SSL:</p>
<pre>ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES</pre>
<p>The last thing you need is to specify the SSL files. There are already default files you can use.</p>
<pre># This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key</pre>
<p>You can also use your own SSL files if you want. You just have to set the appropriate path.</p>
<p>After a restart of Vsftpd, everything should work.</p>
<p><em>Note: If you&#8217;ve just installed vsftpd, you should make some additional configurations depending on your needs.</em></p>
<p>These are some adjustments I recommend:</p>
<pre># Allow anonymous FTP? (Beware - allowed by default if you comment this out).
anonymous_enable=NO
# Uncomment this to allow local users to log in.
local_enable=YES
# Uncomment this to enable any form of FTP write command.
write_enable=YES
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022</pre>
<p>The post <a href="http://black-pixel.net/configure-vsftpd-to-use-ftps.html">Configure Vsftpd to use FTPS</a> appeared first on <a href="http://black-pixel.net">Black-Pixel</a>.</p> <p><a href="http://black-pixel.net/?flattrss_redirect&amp;id=601&amp;md5=a2a2af4988ed53b444e3bdfb7ae6ae83" title="Flattr" target="_blank"><img src="http://black-pixel.net/wp-content/plugins/flattr/img/flattr-badge-large.png" alt="flattr this!"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://black-pixel.net/configure-vsftpd-to-use-ftps.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<atom:link rel="payment" title="Flattr this!" href="https://flattr.com/submit/auto?user_id=black-pixel&amp;popout=1&amp;url=http%3A%2F%2Fblack-pixel.net%2Fconfigure-vsftpd-to-use-ftps.html&amp;language=en_GB&amp;category=text&amp;title=Configure+Vsftpd+to+use+FTPS&amp;description=This+is+a+little+HOWTO+on+configuring+Vsftpd+to+use+FTP+over+SSL+and+FTPS+only%2C+which+is+highly+recommended.+You+can+use+it+to+upgrade+WordPress+and+install+plugins%2C...&amp;tags=Server%2Cblog" type="text/html" />
	</item>
	</channel>
</rss>
