<?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>Marios Braindump &#187; webserver</title>
	<atom:link href="http://www.mfasold.net/blog/tag/webserver/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mfasold.net/blog</link>
	<description>Just shouting my thoughts out</description>
	<lastBuildDate>Tue, 01 Mar 2011 12:27:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Setting up subversion for multiple repositories on a Plesk/Ubuntu VServer</title>
		<link>http://www.mfasold.net/blog/2008/09/subversion-setup-for-multiple-repositories-on-pleskubuntu-vserver/</link>
		<comments>http://www.mfasold.net/blog/2008/09/subversion-setup-for-multiple-repositories-on-pleskubuntu-vserver/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 17:11:04 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[tech]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.mfasold.net/blog/?p=32</guid>
		<description><![CDATA[Setting up a SVN server on an Ubuntu Vserver running Plesk is smooth like butter. Mmmh, butter&#8230; Just for future reference, i&#8217;m going to  explain it here.
Update: Configuration of basic authentication is included now.
First, install subversion and the Apache library with the command
sudo apt-get install subversion libapache2-svn
Next, enter the Subversion/Apache configuration into the vhost.conf [...]]]></description>
			<content:encoded><![CDATA[<p>Setting up a SVN server on an Ubuntu Vserver running Plesk is smooth like butter. Mmmh, butter&#8230; Just for future reference, i&#8217;m going to  explain it here.</p>
<p><em>Update: Configuration of basic authentication is included now.</em></p>
<p><span id="more-32"></span>First, install subversion and the Apache library with the command</p>
<blockquote><p><code>sudo apt-get install subversion libapache2-svn</code></p></blockquote>
<p>Next, enter the Subversion/Apache configuration into the vhost.conf file of the respective domain, e.g. /var/www/vhosts/[DOMAIN NAME]/conf/vhost.conf. This file contains all the important Apache stuff for the subdomain.</p>
<blockquote><p><code>&lt;Location /svn&gt;<br />
DAV svn<br />
SVNParentPath /var/www/vhosts/[DOMAIN NAME]/svn<br />
# The following three lines allow anonymous read, but make<br />
# committers authenticate themselves.<br />
&lt;LimitExcept GET PROPFIND OPTIONS REPORT&gt;<br />
AuthType Basic<br />
AuthName "SVN Authorization Realm"<br />
AuthUserFile /var/www/vhosts/[DOMAIN NAME]/svn/svnAuthUsers.passwd<br />
Require valid-user<br />
&lt;/LimitExcept&gt;<br />
&lt;/Location &gt;</code></p></blockquote>
<p>What is left is to create an example repository, restart Apache</p>
<blockquote><p><code>cd /var/www/vhosts/[DOMAIN NAME]<br />
mkdir svn<br />
svnadmin create svn/test<br />
chown -R www-data:www-data svn/<br />
sudo /etc/init.d/apache2 restart</code></p></blockquote>
<p>and to test it from your home computer</p>
<blockquote><p><code>svn co http://www.[DOMAIN NAME]/svn/test</code></p></blockquote>
<p>To allow you &#8211; and only you &#8211; to commit new files, authentication has to be configured. Run the following command on the the server, using your local user name for convenience:</p>
<blockquote><p><code>htpasswd -c /var/www/vhosts/[DOMAIN NAME]/svn/svnAuthUsers.passwd [USERNAME]</code></p></blockquote>
<p>You will be prompted for a password. Commiting new files and directories should work now as well. And that&#8217;s pretty much it!</p>
<p>To allow only authenticated users to checkout the repository, remove both lines containing the &#8220;LimitExcept&#8221; from the vhost.conf file. Another excellent explanation of the setup process is to be found <a href="http://cheminfo.informatics.indiana.edu/~rguha/misc/svnapache.html">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mfasold.net/blog/2008/09/subversion-setup-for-multiple-repositories-on-pleskubuntu-vserver/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to set up usable shell access on Plesk VServers</title>
		<link>http://www.mfasold.net/blog/2008/09/an-usable-shell-access-on-plesk-vservers/</link>
		<comments>http://www.mfasold.net/blog/2008/09/an-usable-shell-access-on-plesk-vservers/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 13:13:13 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.mfasold.net/blog/?p=31</guid>
		<description><![CDATA[Imagine you set up a new domain on your VServer. After filling in all the data, Plesk creates a directory /var/www/vhosts/FOODOMAIN which is the home directory for the domain&#8217;s ftp user as well. This makes sense for FTP access as the directory contains all the important subdirectories  such as httpdocs, conf, statistics and more. [...]]]></description>
			<content:encoded><![CDATA[<p>Imagine you set up a new domain on your VServer. After filling in all the data, Plesk creates a directory /var/www/vhosts/FOODOMAIN which is the home directory for the domain&#8217;s ftp user as well. This makes sense for FTP access as the directory contains all the important subdirectories  such as httpdocs, conf, statistics and more. If you want to grant the user shell access via ssh, however, this default setting is pretty useless. Namely, the directory FOODOMAIN itself is not writable for the user. That means he actually cannot create any files in his home directory, for example dotfiles such as .bashrc or .emacs. This greatly limits usability for advanced shell users.</p>
<p><span id="more-31"></span></p>
<p>In the follwing steps, I show you how to overcome the problem by creating a new user that has has the same user id but a different home directory. First, create the domain FOODOMAIN with ftp user FTPUSER in plesk as usual (insert the names that you want). Login onto the vserver via ssh. Let us first determine the user id of FTPUSER as described <a href="http://forum.swsoft.com/showthread.php?postid=118777">here</a> (assume your FTPUSER=jack):</p>
<blockquote><p><code>Issue the shell command:<br />
cat /etc/passwd |grep 'jack'</code><br />
<code><br />
This will show you a line similar to the following:<br />
jack:x:10041:10001::/home/httpd/vhosts/example.com:/usr/local/psa/bin/chrootsh</code><br />
<code><br />
The first number (after the 2nd colon : ) is 10041, so this is the UID of user jack.<br />
You will need this in the 'useradd' lines since useradd wants a number for the UID.</code></p></blockquote>
<p>Let us now create the user. As USERID insert the number from the last step, e.g.10041.</p>
<blockquote><p><code>useradd -u USERID -o  -g psacln -d /var/www/vhosts/FOODOMAIN/home -s /bin/bash SHELLUSER </code></p></blockquote>
<p>Finally, we create the new home directory the user is actually allowed to write in.</p>
<blockquote><p><code>cd /var/www/vhosts/FOODOMAIN<br />
mkdir home<br />
chown SHELLUSER: home </code></p></blockquote>
<p>There you go, FOOUSER can now work in a nerdy fashion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mfasold.net/blog/2008/09/an-usable-shell-access-on-plesk-vservers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing MoinMoin Wiki on a Ubuntu VServer with Plesk</title>
		<link>http://www.mfasold.net/blog/2008/05/installing-moinmoin-wiki-on-a-ubuntu-vserver-with-plesk/</link>
		<comments>http://www.mfasold.net/blog/2008/05/installing-moinmoin-wiki-on-a-ubuntu-vserver-with-plesk/#comments</comments>
		<pubDate>Thu, 01 May 2008 21:33:21 +0000</pubDate>
		<dc:creator>Mario</dc:creator>
				<category><![CDATA[tech]]></category>
		<category><![CDATA[english]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.mfasold.net/blog/?p=16</guid>
		<description><![CDATA[I just spent a day getting MoinMoin Wiki to run my vserver. Since I had rather spent this time otherwise and I assume the same holds for you too, I give you a step-by-step tutorial about how to get it running quickly.  If you have root access to a vserver running plesk and want [...]]]></description>
			<content:encoded><![CDATA[<p>I just spent a day getting MoinMoin Wiki to run my vserver. Since I had rather spent this time otherwise and I assume the same holds for you too, I give you a step-by-step tutorial about how to get it running quickly.  If you have root access to a vserver running plesk and want to install the wiki for one or more domains hosted on that server, these instructions are right for you!</p>
<p><span id="more-16"></span></p>
<p>The problem here is that Plesk makes various assumptions about default directories, permissions and apache configuration. Let us assume you want to set up a wiki for the domain FOO.COM, the home of which is located at <code>/var/www/vhosts/FOO.COM</code> on your vserver. The ftp user for FOO.COM is called RICKY. Run the following commands as root (please adjust directories and version numbers):<br />
<code>wget http://static.moinmo.in/files/moin-1.6.3.tar.gz<br />
tar -xvzf moin-1.6.3.tar.gz<br />
cd moin-1.6.3<br />
python setup.py install --prefix='/usr/local' --record=install.log</code></p>
<p>These are the instructions for <a href="http://moinmo.in/HelpOnInstalling/BasicInstallation">Basic MoinMoin Installation</a>. Note that there is a MoinMoin package for Dapper, but the latest version is 1.5.9. The installation has been succesful if entering &#8220;import MoinMoin&#8221; in python gives no error message. We will now create a &#8220;wiki instance&#8221;, which is a single wiki for a particular domain.</p>
<p>Typically, the documents delivered by the webserver are located at <code>/var/www/vhosts/FOO.COM/httpdocs</code>. We don&#8217;t want to install the instance here since anybody would be able to download all wiki data. Instead, we put the data directly to <code>/var/www/vhosts/WIKINAME</code> (please select any WIKINAME). Go to the domain root and open and create the file createInstance.sh with an editor of your choice (I prefer emacs):</p>
<p><code>cd /var/www/vhosts/FOO.COM/<br />
emacs createInstance.sh</code></p>
<p>Paste in the script shown <a href="http://moinmo.in/HelpOnInstalling/WikiInstanceCreation?action=AttachFile&amp;do=view&amp;target=createinstance.sh">here</a> and replace the following entries:</p>
<p><code>SHARE=/usr/local/share/moin<br />
USER=RICKY<br />
GROUP=psacln</code></p>
<p>By the way, psacln is the default group used for ftp users by Plesk. Create the instance by hitting</p>
<p><code>chmod +x createInstance.sh<br />
./createInstance.sh WIKINAME</code></p>
<p>We will now adjust the wiki configuration files for use with our local directory structure and wiki name. First, open the file <code>/var/www/vhosts/FOO.COM/WIKINAME/wikiconfig.py</code> and replace the line <code>data_dir = './data/'</code> with <code>data_dir = '/var/www/vhosts/FOO.COM/WIKINAME/data/'</code> and replace <code>data_underlay_dir = './underlay/'</code> with <code>data_underlay_dir = '/var/www/vhosts/FOO.COM/WIKINAME/underlay/'</code>. Please take care that the indentation of these lines stays like it is and no TAB is inserted.</p>
<p>Now go to the directory <code>/var/www/vhosts/FOO.COM/cgi-bin</code>, which Plesk created by default. Enter</p>
<p><code>cp /usr/local/share/moin/server/moin.cgi .<br />
chmod 751 moin.cgi<br />
emacs moin.cgi</code></p>
<p>In your editor, replace the line <code>sys.path.insert(0, '/path/to/wikiconfig')</code> with s<code>ys.path.insert(0, '/var/www/vhosts/FOO.COM/WIKINAME')</code>.</p>
<p>The only thing which is left to do, is to tell the webserver where it can find the static files for the wiki. WIth plask, you may never alter http.conf or http.include files, as these changes are overwritten next time you change anything using the plesk webinterface. Instead, you will have to edit the file <code>/var/www/vhosts/FOO.COM/vhost.conf</code>! Paste the following into that file (maybe change 163 to your version number)</p>
<p><code><br />
alias /moin_static163 "/usr/local/share/moin/htdocs"<br />
&lt;Directory /usr/local/share/moin/htdocs&gt;<br />
Order allow,deny<br />
allow from all<br />
&lt;/Directory&gt;</code></p>
<p>Restart the webserver with</p>
<p><code>/etc/init.d/apache2 restart</code></p>
<p>If you have done everything right, you should now be able to access your wiki under the domain <code>FOO.COM/cgi-bin/moin.cgi</code>. Voilá! Further configuration is needed, but your wiki is up and running right now. If your wiki is too slow, you might want to consider switching to mod_python which i will explain in the sometime. You can create a nicer alias such as <code>FOO.COM/WIKI</code> for the wiki by adding following line to vhosts.conf</p>
<p><code>ScriptAlias /WIKI "/var/www/vhosts/FOO.COM/cgi-bin/moin.cgi"</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mfasold.net/blog/2008/05/installing-moinmoin-wiki-on-a-ubuntu-vserver-with-plesk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

