<?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>apache2 &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/apache2/</link>
	<description>Feed of posts on WordPress.com tagged "apache2"</description>
	<pubDate>Mon, 30 Nov 2009 02:44:38 +0000</pubDate>

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

<item>
<title><![CDATA[Windows Server 2003'e Veda (I)]]></title>
<link>http://alkankoray.wordpress.com/2009/11/05/windows-server-2003e-veda-i/</link>
<pubDate>Thu, 05 Nov 2009 09:35:51 +0000</pubDate>
<dc:creator>Koray</dc:creator>
<guid>http://alkankoray.wordpress.com/2009/11/05/windows-server-2003e-veda-i/</guid>
<description><![CDATA[Uzun suredir Windows Server 2003 isletim sistemi uzerinde barindirdigim IIS&#8216;den ASP.NET ve Fas]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Uzun suredir <strong>Windows Server 2003</strong> isletim sistemi uzerinde barindirdigim <strong>IIS</strong>&#8216;den <strong>ASP.NET</strong> ve <strong>FastCGI ile PHP</strong> destegi veren server&#8217;imi tamamen <strong>Ubuntu Server</strong>&#8216;a tasimaya karar verdim. <strong>Apache2, PHP5 ve MySQL</strong> kullaniyor olacagim. Bunun temel nedenlerinden birkaci lisans sorunu ve Linux&#8217;un terminal konusunda Windows&#8217;tan cok daha ustun olmasi, dolayisiyla bana <strong>PDA</strong>&#8216;den bile server&#8217;imi yonetme olanagini saglamasi.</p>
<p>Oncelikle dun (<em>Kasim 4 2009</em>) su anki server&#8217;imi ve barindirdigim sistemi/siteleri hicbir sekilde etkilemeyecek sekilde ikinci bir bilgisayara <em>Ubuntu Linux</em> yukledim, <em>Apache, PHP ve MySQL</em> calisir durumda. Simdilik detayli konfigurasyonlarla ugrasiyorum, <em>FTP kurulumu, VirtualHost</em> konulari gibi.</p>
<p><strong><span style="text-decoration:underline;">→ Ilk Izlenimler</span></strong></p>
<p><img class="size-full wp-image-135 alignright" title="Mac OS Terminal" src="http://alkankoray.wordpress.com/files/2009/11/windowsserver2003e_veda.png" alt="Mac OS Terminal" width="313" height="135" />En cok hosuma giden ozellik <strong>SSH</strong> kullanarak sistemdeki her seyi Broadband bir internet baglantisi olmasina gerek kalmadan kontrol edebilmem. Kampus kutuphanesinden son derece hizli bir sekilde terminal&#8217;den konfigurasyon yapiyorum, inanilmaz.</p>
<p>Microsoft IIS&#8217;ten aliskin oldugum <em>Start&#62;Control Panel&#62;Administrative Tools&#62;Internet Information Systems</em> gibi tanimlar cok uzak. Ubuntu Server 9.10 varsayilan olarak <strong>GUI</strong>&#8217;siz geldigi icin her seyi simdilik terminal&#8217;den yapmak zorundayim.</p>
<p>Zorlanmadim denemez. Bir gundur <strong>FTP server icin virtual kullanicilar</strong> yaratmaya calisiyorum. Tabi ki onca artinin yaninda eksilerinin de olmasini bekliyordum ancak bu kadar fazla sorunla karsilasacagimi tahmin etmiyordum!</p>
<p>Simdilik bu kadar, kurulumu yaptiktan sonra 1 ay kadar ikinci server&#8217;imi deneme icin acik birakacagim, bu surec sonunda herhangi buyuk bir problemle karsilasmazsam, su anki kullandigim ana server&#8217;i tamamen Ubuntu&#8217;ya adayacagim.</p>
<p>Benim gibi <em>Microsoft .NET</em> ile yasamini gecirmis biri icin inanilmaz bir adim olacak.</p>
<p>Gelismeleri yazmaya devam edecegim.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Virtual Hosting con Apache2]]></title>
<link>http://fruizondre.wordpress.com/2009/11/04/virtual-hosting-con-apache2/</link>
<pubDate>Wed, 04 Nov 2009 05:07:10 +0000</pubDate>
<dc:creator>Fredy Ruiz Ondre</dc:creator>
<guid>http://fruizondre.wordpress.com/2009/11/04/virtual-hosting-con-apache2/</guid>
<description><![CDATA[Esta es una configuracion de un servidor web con Apache2 que maneja multiples dominios en el mismo s]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Esta es una configuracion de un servidor web con Apache2 que maneja multiples dominios en el mismo servidor, esto es conocido como virtual hosting basado en nombres. Esta configuracion esta hecha en SLES 10 SP2</p>
<p>Instalamos el servidor Apache2 y creamos los directorios donde estaran ambos sitios web.</p>
<p># yast -i apache2<br />
# mkdir /srv/www/web1<br />
# mkdir /srv/www/web2</p>
<p>Despues de crearar ambos directorios y los respectivos html, empezamos a configurar el apache,  para ello editamos el archivo listen.conf</p>
<p># vim /etc/apache2/listen.conf</p>
<p>&#8230;<br />
NameVirtualHost *:80<br />
&#8230;</p>
<p>Ahora nos ubicamos en el directorio /etc/apache2/vhosts.d/ y editamos las .conf para ambos sitios web.</p>
<p># cd /etc/apache2/vhosts.d/<br />
# cp vhost.template web1.conf<br />
# cp vhost.template web2.conf</p>
<p>La configuracion minima por cada pagina debe ser la siguiente:</p>
<p># vim web1.conf</p>
<p>&#60;VirtualHost *:80&#62;<br />
ServerAdmin fruiz@grupopalomino.com.pe<br />
ServerName www.grupopalomino.com.pe<br />
DocumentRoot /srv/www/web1<br />
ErrorLog /var/log/apache2/www.dominio1.com-error_log<br />
CustomLog /var/log/apache2/www.dominio1.com-access_log combined<br />
&#60;Directory &#8220;/srv/www/web1&#8243;&#62;<br />
Options Indexes FollowSymLinks<br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
&#60;/Directory&#62;<br />
&#60;/VirtualHost&#62;</p>
<p>Del mismo modo la pagina web2  &#8230;</p>
<p>Listo ahora iniciamos el servicio apache</p>
<p># rcapache2 start</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Enable mod_rewrite in Apache2]]></title>
<link>http://datou.wordpress.com/2009/11/02/enable-mod_rewrite-in-apache2/</link>
<pubDate>Sun, 01 Nov 2009 17:48:11 +0000</pubDate>
<dc:creator>Datou</dc:creator>
<guid>http://datou.wordpress.com/2009/11/02/enable-mod_rewrite-in-apache2/</guid>
<description><![CDATA[sudo a2enmod rewrite sudo gedit /etc/apache2/sites-enabled/000-default Change AllowOverride None to ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><ol>
<li>sudo a2enmod rewrite</li>
<li>sudo gedit /etc/apache2/sites-enabled/000-default</li>
<li>Change AllowOverride None to AllowOverride All</li>
<li>Restart Apache: sudo /etc/init.d/apache2 force-reload</li>
</ol>
<p>Source : <a href="http://ubuntuforums.org/archive/index.php/t-255556.html">http://ubuntuforums.org/archive/index.php/t-255556.html</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting up CAS on Tomcat with Apache2 and SSL on Ubuntu – part 4]]></title>
<link>http://steelmon.wordpress.com/2009/10/23/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-4/</link>
<pubDate>Fri, 23 Oct 2009 13:01:48 +0000</pubDate>
<dc:creator>steelmon</dc:creator>
<guid>http://steelmon.wordpress.com/2009/10/23/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-4/</guid>
<description><![CDATA[A common scenario when providing services via the web is to expose all applications via an Apache fr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>A common scenario when providing services via the web is to expose all applications via an Apache front end. The Apache server acts as a dispatcher, or reverse proxy, and takes care of virtual hosting as well as any SSL traffic. This way, only one IP address needs to be exposed to the Internet while users gets the experience of multiple stand-alone sites. This article series also describes how applications can be conveniently put behind access control using the Central Authentication Service, or CAS for short.</strong></p>
<h1>Part 4 – Protecting resources with CAS</h1>
<p>This article is number four in a series. The steps described here are based on configurations that have been performed in the earlier steps. It is strongly recommended to read these first:</p>
<ul>
<li><a href="../2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-1/"> Part 1 – Setting up Apache2 for virtual hosting</a></li>
<li><a href="../2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-2/">Part 2 – Adding SSL support to Apache2 virtual hosts</a></li>
<li><a href="http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-3/">Part 3 – Adding Tomcat behind an Apache2 reverse proxy</a></li>
</ul>
<p>We&#8217;ll start by downloading and deploying CAS. The CAS server is found at <a href="http://www.ja-sig.org/downloads/cas/cas-server-3.3.4-release.tar.gz">http://www.ja-sig.org/downloads/cas/cas-server-3.3.4-release.tar.gz</a>. While we&#8217;re at it, we are going to download the CAS client as well: <a href="http://www.ja-sig.org/downloads/cas-clients/cas-client-java-2.1.1.tar.gz">http://www.ja-sig.org/downloads/cas-clients/cas-client-java-2.1.1.tar.gz</a></p>
<p>Extract the server and client to a suitable location, e.g. your desktop. From the extracted server directory copy <tt>modules/cas-server-webapp-3.3.4.war</tt> to Tomcats <tt>webapps/</tt> directory (if you are following all steps in this guide it should be located in <tt>/opt/apache-tomcat-5.5.28/webapps</tt>). Start Tomcat and point the web browser to <tt>http://localhost:8080/cas-server-webapp-3.3.4/login</tt>.</p>
<p>You should now see the CAS login page where you can enter your username and password. By default, you should be able to log in by entering <em>password</em> in both the user name and password fields. If everything is working, a page stating that you have logged in successfully, should be displayed.</p>
<p>Now, we need to configure Tomcat to use CAS for authentication. In this setup we will be looking at CAS-enabling the Tomcat Manager application (there is a link to the Manager application under the <em>Administration</em> headline in the top left corner of Tomcat&#8217;s welcome page). If you try to access it at this stage, you will just be asked to log in using a basic auth scheme.</p>
<p>Locate the web.xml descriptor for the manager web application found in the <tt>/opt/apache-tomcat-5.5.28/server/webapps/manager/WEB-INF</tt>. Now we will remove the container authentication and security configuration and replace it with CAS and a simple authorization filter. To be on the safe side, make a backup copy in case you mess things up and want to start over:</p>
<p style="padding-left:30px;"><tt>cp web.xml web.xml.bk</tt></p>
<p>Open the <tt>web.xml</tt> file and locate the following line, about two thirds into the file:</p>
<p style="padding-left:30px;"><tt>&#60;!-- Define reference to the user database for looking up roles --&#62;</tt></p>
<p>Remove everything from there to the end of the configuration file, leaving just the closing line:</p>
<p style="padding-left:30px;"><tt>&#60;/web-app&#62;</tt></p>
<p>Scroll back to the top of the configuration, and insert the following, just after the closing <tt>&#60;/description&#60;</tt> tag, about ten lines from the top:</p>
<pre>  &#60;filter&#62;
    &#60;filter-name&#62;CASFilter&#60;/filter-name&#62;
    &#60;filter-class&#62;edu.yale.its.tp.cas.client.filter.CASFilter&#60;/filter-class&#62;
    &#60;init-param&#62;
        &#60;param-name&#62;edu.yale.its.tp.cas.client.filter.loginUrl&#60;/param-name&#62;
	&#60;param-value&#62;https://one.example.com/cas-server-webapp-3.3.4/login&#60;/param-value&#62;
    &#60;/init-param&#62;
    &#60;init-param&#62;
        &#60;param-name&#62;edu.yale.its.tp.cas.client.filter.validateUrl&#60;/param-name&#62;
        &#60;param-value&#62;https://one.example.com/cas-server-webapp-3.3.4/serviceValidate&#60;/param-value&#62;
    &#60;/init-param&#62;
    &#60;init-param&#62;
        &#60;param-name&#62;edu.yale.its.tp.cas.client.filter.serverName&#60;/param-name&#62;
        &#60;param-value&#62;one.example.com:443&#60;/param-value&#62;
    &#60;/init-param&#62;
  &#60;/filter&#62;

  &#60;filter&#62;
    &#60;filter-name&#62;Authz Filter&#60;/filter-name&#62;
    &#60;filter-class&#62;edu.yale.its.tp.cas.client.filter.SimpleCASAuthorizationFilter&#60;/filter-class&#62;
    &#60;init-param&#62;
        &#60;param-name&#62;edu.yale.its.tp.cas.client.filter.authorizedUsers&#60;/param-name&#62;
        &#60;param-value&#62;password&#60;/param-value&#62;
    &#60;/init-param&#62;
  &#60;/filter&#62;

  &#60;filter-mapping&#62;
      &#60;filter-name&#62;CASFilter&#60;/filter-name&#62;
      &#60;url-pattern&#62;/*&#60;/url-pattern&#62;
  &#60;/filter-mapping&#62;

  &#60;filter-mapping&#62;
      &#60;filter-name&#62;Authz Filter&#60;/filter-name&#62;
      &#60;url-pattern&#62;/*&#60;/url-pattern&#62;
  &#60;/filter-mapping&#62;</pre>
<p>What the above configuration says is that a servlet filter, <tt>CASFilter</tt> will intercept all requests to the application and check that the user is authenticated by CAS. If not, the user will be redirected to the CAS log in page. In the same way, the servlet filter <tt>Authz Filter</tt> will make sure that the user is authorized. The authorization is extremely simple in this example &#8211; it just checks that the user name is in the list specified in the filter parameter <tt>edu.yale.its.tp.cas.client.filter.authorizedUsers</tt>. The authentication filter (<tt>CASFilter</tt>) parameters might benefit from some more explanation:</p>
<ul>
<li><strong>edu.yale.its.tp.cas.client.filter.loginUrl</strong> points to the URL where users are redirected in case they are not already authenticated</li>
<li><strong>edu.yale.its.tp.cas.client.filter.validateUrl</strong> points to the URL of the web service that provides the validation service. This URL needs to start with HTTPS &#8211; otherwise an exception will be thrown. Since we are using Apache2 as a front end to take care of all SSL handling, we point to an address that is managed by Apache (i.e. port 443). We will have to trust the SSL certificate of Apache, as will be shown shortly.</li>
<li><strong>edu.yale.its.tp.cas.client.filter.serverName</strong> points to the server name (and port) to which the user gets redirected to after a successful login.</li>
</ul>
<p>In order for the Tomcat Manager application to be able to communicate with CAS (through the just defined servlet filter), we need to add the CAS client jar file. Provided you extracted the client archive to the desktop, copy the file <tt>~/Desktop/cas-client-java-2.1.1/dist/casclient.jar</tt> to the Tomcat managers <tt>lib</tt> directory:</p>
<p style="padding-left:30px;"><tt>cp ~/Desktop/cas-client-java-2.1.1/dist/casclient.jar /opt/apache-tomcat-5.5.28/server/webapps/manager/WEB-INF/lib</tt></p>
<p>If you are using a commercial certificate for your Apache2 web server (i.e. a certificate that has been signed by a root CA certificate found in the JVM trust store), you are done. Since this example is based on using a self signed certificate, we need to add our certificate to the trust store manually. The reason for this is that the CAS servlet filter utilizes HTTPS, and that Java (rightfully) refuses to establish a connection if it can not verify that the identity of the remote side is valid.</p>
<p>To import the Apache2 certificate into the trust store, start by converting it into DER format:</p>
<p style="padding-left:30px;"><tt>cd /etc/apache2/ssl</tt><br />
<tt>sudo openssl  x509 -in apache.pem -out apache.crt -outform DER</tt></p>
<p>Now, import the DER certificate into the JVM trust store:</p>
<p style="padding-left:30px;"><tt>keytool -import -trustcacerts -keystore /usr/lib/jvm/java-6-sun/jre/lib/security/cacerts -storepass changeit -alias apache -file /etc/apache2/ssl/apache.crt</tt></p>
<p>Restart Tomcat and enjoy the CAS-enabled Tomcat Manager!</p>
<h2>References</h2>
<p><a href="http://www.ja-sig.org/wiki/display/CAS/CASifying+Tomcat+Manager">http://www.ja-sig.org/wiki/display/CAS/CASifying+Tomcat+Manager</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Virtual Hosting Using apache2]]></title>
<link>http://somepalli.wordpress.com/2009/10/23/virtual-hosting-using-apache2/</link>
<pubDate>Fri, 23 Oct 2009 05:54:16 +0000</pubDate>
<dc:creator>somepalli</dc:creator>
<guid>http://somepalli.wordpress.com/2009/10/23/virtual-hosting-using-apache2/</guid>
<description><![CDATA[What is Virtual Hosting and where and why it is used? Vitual Hosting is a method that servers such a]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>What is Virtual Hosting and where and why it is used?</strong></p>
<p><strong>Vitual Hosting </strong>is a method that servers such as web servers use to host more than one domain</p>
<p>name on the same computer.</p>
<p>Virtual hosting allows a website owner to have a site hosted on a web server that is shared with</p>
<p>other websites. In other words, virtual hosting services and bandwidht to more than one website.</p>
<p>Virtual web hosting is one of the most popular hosting options available at the moment -</p>
<p>probably because of cost effective because you won&#8217;t have to pay for a dedicated server to host just</p>
<p>your website.</p>
<p>Virtual web hosting is good solution for <strong>SME&#8217;s</strong> even for <strong>MNC&#8217;s</strong> also websites that aren&#8217;t constantly being visited</p>
<p>There are two basic methods of accomplishing virtual hosting: <strong>name-based</strong>, and IP address or <strong>ip-based</strong>.</p>
<p><em><strong><span style="color:#0000ff;">Lets move to the Practical Session<br />
</span></strong></em></p>
<p><strong>Check are you have Apache2, mysql5, php5 in your PC or Laptop or NoteBook what ever you calls otherwise follow below steps</strong></p>
<p>1. Install LAMP</p>
<p>2. Control Apache2</p>
<p>3. Control MySql</p>
<p>4. Virtual Hosting</p>
<p>5. Virtual Hosting with multiple names</p>
<p><strong>1. Install LAMP &#8211; Linux Apache2 Mysql Php</strong></p>
<p>I preasume you have Ubuntu Linux installed. Let’s install everything else (Apache 2, PHP5 and MySQL 5)</p>
<blockquote><p>sudo aptitude install apache2 mysql-server php5 php5-mysql libapache2-mod-php5</p></blockquote>
<p>Open your favourite web browser and enter http://localhost (or http://127.0.0.1)</p>
<p>Check if Apache 2 and PHP 5 work fine</p>
<p>Create a file called test.php and enter this text in it</p>
<blockquote><p>&#60;?php phpinfo(); ?&#62;</p></blockquote>
<p>Save the file and copy it to your web site folder, e.g. /var/www</p>
<p>Open your web browser and run</p>
<blockquote><p>http://localhost/test.php</p></blockquote>
<p><strong>2. Control Apache2</strong></p>
<p>To start Apache2</p>
<blockquote><p>sudo /etc/init.d/apache2 start</p></blockquote>
<p>To stop Apache2</p>
<blockquote><p>sudo /etc/init.d/apache2 stop</p></blockquote>
<p>To restart Apache2</p>
<blockquote><p>sudo /etc/init.d/apache2 restart</p></blockquote>
<p>After first install I always get this error:</p>
<blockquote><p>apache2: Could not determine the server&#8217;s domain name, using 127.0.0.1 for ServerName</p></blockquote>
<p>It is easily fixed &#8211; add ServerName localhost into apache2.conf</p>
<blockquote><p>gksudo gedit /etc/apache2/apache2.conf</p></blockquote>
<p><strong>3. Control MySQL</strong></p>
<p>To start MySQL</p>
<blockquote><p>sudo /etc/init.d/mysql start</p></blockquote>
<p>To restart MySQL</p>
<blockquote><p>sudo /etc/init.d/mysql restart</p></blockquote>
<p>To stop MySQL</p>
<blockquote><p>sudo /etc/init.d/mysql stop</p></blockquote>
<p><strong>Creating Database using MySql</strong></p>
<p>First Login into MySql Using Following Command here it will ask password then enter the root password of My Sql. MySql Password has given when it was Installing</p>
<blockquote><p>mysql -u root -p</p></blockquote>
<p>Create Database</p>
<blockquote><p>Create Database virtual;</p></blockquote>
<p>Use Database</p>
<blockquote><p>Use virtual;</p></blockquote>
<h3><strong>4. Virtual Hosting</strong></h3>
<p><strong><br />
</strong></p>
<p><strong>(a) Allow user to web directory </strong></p>
<p><strong>(b) Create Folder and link to web directory</strong></p>
<p><strong>(c) Using Virtual Hosts </strong></p>
<p><strong>(d) Adding Virtual Hosts</strong></p>
<p><strong>(e) Apache Configuaration<br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong>l</strong><strong>ocalhost</strong> is the default <strong>host</strong>, but if you add <strong>virtal hosts</strong>, you may want to change it to, say, <strong>somechow</strong></p>
<p>However, the address<strong> http://localhost/</strong> by default points to <strong>/var/www</strong>. That folder is basically empty that is why you do not see much in your web browser.</p>
<p>To show proper web site, you need to put some web pages in that folder.</p>
<p><strong>(a)</strong> allow yourselft to have access to the folder /var/www</p>
<blockquote><p>sudo chown -R USERNAME /var/www</p></blockquote>
<p>Now, you can copy your great web site to the folder <strong>/var/www</strong>.</p>
<p>Start Firefox again and type <strong>http://localhost/</strong>. Do you see you web site?</p>
<p>If you hate to always navigate to /var/www, you can press Control-D in Nautilus to add a new bookmark in Places menu. You can create a link to it in your home folder for easy access, alternatively.</p>
<p><strong>(b)</strong> Create a folder in your desired location and link to the web direcotry</p>
<blockquote><p>ln -s /var/www ~/WebSite</p></blockquote>
<p>Now you can place all your web content inside the folder WebSite in your home folder and you will see your web site by going to</p>
<blockquote><p>http://localhost/</p></blockquote>
<p><strong>(c)</strong> Using virtual hosts</p>
<p>If I put a folder called somechow inside <strong>/var/www</strong>, I can run my local web site by entering <strong>http://localhost/somechow</strong>.</p>
<p>However, I prefer more human-readable web addresses. For example, when I enter <strong>http://somechow</strong>, my local WordPress copy of somechow.Ws (located in /home/some/WebSites/somechow) runs in Firefox.</p>
<p>To use virtual hosts, you need to change hosts file and add some information for Apache.</p>
<p><strong>(d)</strong> I add my virtual host address to Hosts file</p>
<blockquote><p>sudo nano /etc/hosts</p>
<p>127.0.0.1 somechow</p></blockquote>
<p>In above quote instead of 127.0.0.1 I used my desktop IP.</p>
<p>Then I reboot the computer or networking for changes to take effect</p>
<blockquote><p>sudo /etc/init.d/networking restart</p></blockquote>
<p><strong>(e)</strong> Apache Configuration</p>
<p>Open the window in super user mode  uisng following command prompt</p>
<blockquote><p>sudo nautilus</p></blockquote>
<p>I create a copy of file default which is located in <strong>/etc/apache2/sites-available</strong> and rename it to <strong>somechow</strong>.</p>
<p>I created a link to this file by right-clicking and selected <strong>MakeLink</strong> option</p>
<p>I copy this link to <strong>/etc/apache2/sites-enabled</strong></p>
<p>I change link file into <strong>somechow</strong>:</p>
<p><strong>NameVirtualHost * </strong>is changed to <strong>NameVirtualHost somechow</strong></p>
<p><strong>ServerName@somechow</strong> is added under <strong>ServerAdmin</strong></p>
<p><strong>DocumentRoot /var/www/ </strong>is changed to <strong>DocumentRoot /home/some/WebSites/somechow</strong></p>
<h3></h3>
<h3><strong>5. Virtual Hosting with multiple names</strong></h3>
<p><strong><br />
</strong></p>
<p><strong>(a) Allow user to web directory </strong></p>
<p><strong>(b) Create Folder and link to web directory</strong></p>
<p><strong>(c) Using Virtual Hosts </strong></p>
<p><strong>(d) Adding Virtual Hosts</strong></p>
<p><strong>(e) Apache Configuaration</strong></p>
<p><strong>l</strong><strong>ocalhost</strong> is the default <strong>host</strong>, but if you add <strong>virtal hosts</strong>, you may want to change it to, say, <strong>somechow </strong>and<strong> somedary<br />
</strong></p>
<p>However, the address<strong> http://localhost/</strong> by default points to <strong>/var/www</strong>. That folder is basically empty that is why you do not see much in your web browser.</p>
<p>To show proper web site, you need to put some web pages in that folder.</p>
<p><strong>(a)</strong> allow yourselft to have access to the folder /var/www</p>
<blockquote><p>sudo chown -R USERNAME /var/www</p></blockquote>
<p>Now, you can copy your great web site to the folder <strong>/var/www</strong>.</p>
<p>Start Firefox again and type <strong>http://localhost/</strong>. Do you see you web site?</p>
<p>If you hate to always navigate to /var/www, you can press Control-D in Nautilus to add a new bookmark in Places menu. You can create a link to it in your home folder for easy access, alternatively.</p>
<p><strong>(b)</strong> Create a folder in your desired location and link to the web direcotry</p>
<blockquote><p>ln -s /var/www ~/WebSite</p></blockquote>
<p>Now you can place all your web content inside the folder WebSite in your home folder and you will see your web site by going to</p>
<blockquote><p>http://localhost/</p></blockquote>
<p><strong>(c)</strong> Using virtual hosts</p>
<p>If I put a folder called <strong>somechow</strong> and <strong>somedary</strong> inside <strong>/var/www</strong>, I can run my local web site by entering <strong>http://localhost/somechow</strong> or <strong>http://localhost/somedary</strong></p>
<p>However, I prefer more human-readable web addresses. For example, when I enter <strong>http://somechow</strong> and <strong>http://somedary</strong> , my local WordPress copy of somechow.Ws or somedary.ws(located in /home/some/WebSites/somechow and /home/some/WebSites/somedary ) runs in Firefox.</p>
<p>To use virtual hosts, you need to change hosts file and add some information for Apache.</p>
<p><strong>(d)</strong> I add my virtual host address to Hosts file</p>
<blockquote><p>sudo nano /etc/hosts</p>
<p>127.0.0.1 somechow</p>
<p>127.0.0.1 somedary</p></blockquote>
<p>In above quote instead of 127.0.0.1 I used my desktop IP.</p>
<p>Then I reboot the computer or networking for changes to take effect</p>
<blockquote><p>sudo /etc/init.d/networking restart</p></blockquote>
<p><strong>(e)</strong> Apache Configuration <strong> </strong></p>
<p><strong> (i) For</strong> <strong>somechow</strong></p>
<p>Open the window in super user mode  uisng following command prompt</p>
<blockquote><p>sudo nautilus</p></blockquote>
<p>I create a copy of file default which is located in <strong>/etc/apache2/sites-available</strong> and rename it to <strong>somechow</strong>.</p>
<p>I created a link to this file by right-clicking the <strong>somechow</strong> and selected <strong>MakeLink</strong> option</p>
<p>I copy this link to <strong>/etc/apache2/sites-enabled</strong></p>
<p>I change link file into <strong>somechow</strong>:</p>
<p><strong>NameVirtualHost * </strong>is changed to <strong>NameVirtualHost somechow</strong></p>
<p><strong>ServerName@somechow</strong> is added under <strong>ServerAdmin</strong></p>
<p><strong>DocumentRoot /var/www/ </strong>is changed to <strong>DocumentRoot /home/some/WebSites/somechow</strong></p>
<p><strong> </strong></p>
<p><strong> (ii) For</strong> <strong>somedary</strong></p>
<p>Open the window in super user mode  uisng following command prompt</p>
<blockquote><p>sudo nautilus</p></blockquote>
<p>I create a copy of file default which is located in <strong>/etc/apache2/sites-available</strong> and rename it to <strong>somedary</strong>.</p>
<p>I created a link to this file by right-clicking the <strong>somechow</strong> and selected <strong>MakeLink</strong> option</p>
<p>I copy this link to <strong>/etc/apache2/sites-enabled</strong></p>
<p>I change link file into <strong>somedary</strong>:</p>
<p><strong>NameVirtualHost * </strong>is changed to <strong>NameVirtualHost somedary</strong></p>
<p><strong>ServerName@somedary</strong> is added under <strong>ServerAdmin</strong></p>
<p><strong>DocumentRoot /var/www/ </strong>is changed to <strong>DocumentRoot /home/some/WebSites/somedary</strong></p>
<p><strong><br />
</strong></p>
<p><strong><br />
</strong></p>
<p><strong><span style="color:#339966;"><br />
</span></strong></p>
<p><strong><span style="color:#339966;"><br />
</span></strong></p>
<p><strong><br />
</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting up CAS on Tomcat with Apache2 and SSL on Ubuntu – part 3]]></title>
<link>http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-3/</link>
<pubDate>Thu, 22 Oct 2009 15:15:11 +0000</pubDate>
<dc:creator>steelmon</dc:creator>
<guid>http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-3/</guid>
<description><![CDATA[A common scenario when providing services via the web is to expose all applications via an Apache fr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>A common scenario when providing services via the web is to expose all applications via an Apache front end. The Apache server acts as a dispatcher, or reverse proxy, and takes care of virtual hosting as well as any SSL traffic. This way, only one IP address needs to be exposed to the Internet while users gets the experience of multiple stand-alone sites. This article series also describes how applications can be conveniently put behind access control using the Central Authentication Service, or CAS for short.</strong></p>
<h1>Part 3 – Adding Tomcat behind an Apache2 reverse proxy</h1>
<p>This article is the third in a series. The steps described here are based on configurations that has been performed in the earlier steps. It is strongly recommended to read these first:</p>
<ul>
<li><a href="http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-1/"> Part 1 – Setting up Apache2 for virtual hosting</a></li>
<li><a href="http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-2/">Part 2 – Adding SSL support to Apache2 virtual hosts</a></li>
</ul>
<p>Before starting any configuration, we need to make sure that the required components are installed. We need to have a working Java installation and Apache Tomcat. I have been using Java 1.6 and Tomcat 5.5, but it should probably work with later versions as well. Start by installing Java:</p>
<p style="padding-left:30px;"><tt>sudo apt-get install sun-java6-jdk</tt></p>
<p>Tomcat is downloaded from the <a href="http://tomcat.apache.org/download-55.cgi">Apache web site</a>. Choose the <em>core</em> package and extract it to <tt>/opt</tt>, or another place of your choice. You may even want to put Tomcat onto a separate server (on which you&#8217;ll need Java installed as well).</p>
<p>Now, you should be able to start Tomcat by running:</p>
<p style="padding-left:30px;"><tt>/opt/apache-tomcat-5.5.28/bin/startup.sh</tt></p>
<p>If you get an error message stating that the JAVA_HOME variable is not set, you can add the following line to the file <tt>/etc/environment</tt>:</p>
<p style="padding-left:30px;"><tt>JAVA_HOME=/usr/lib/jvm/java-6-sun/</tt></p>
<p>This will set the <tt>JAVA_HOME</tt> environment variable globally for all users. In order to read it into memory without rebooting, run the following command:</p>
<p style="padding-left:30px;"><tt>source /etc/environment<br />
export JAVA_HOME</tt></p>
<p>Direct your browser to http://localhost:8080 and make sure you reach the Tomcat welcome page.</p>
<p>Now that tomcat is up and running, we want to enable Apache2 to serve as a front end, taking care of virtual hosting and SSL acceleration. One could argue that any Tomcat installation using SSL benefits from having an Apache front end that handles SSL encryption and decryption in native code.</p>
<p>The preferred way of connecting Apache2 with Tomcat is by using the AJP protocol provided by the mod_jk Apache module. This requires a couple of configurations. We&#8217;ll start by installing the required Apache2 module:</p>
<p style="padding-left:30px;"><tt>sudo apt-get install libapache2-mod-jk</tt></p>
<p>Next, we need to create the file <tt>/etc/apache2/conf.d/tomcat</tt>. By putting it in the <tt>conf.d</tt> directory it is automatically included into the Apache2 configuration:</p>
<p style="padding-left:30px;"><tt># mod_jk config</tt><br />
<tt># Where to find workers.properties</tt><br />
<tt>JkWorkersFile /etc/apache2/workers.properties</tt><br />
<tt>#</tt><br />
<tt># Where to put jk logs</tt><br />
<tt>JkLogFile /var/log/apache2/jk.log</tt><br />
<tt>#</tt><br />
<tt># Set the jk log level [debug/error/info]</tt><br />
<tt>JkLogLevel info</tt><br />
<tt># Select the log format</tt><br />
<tt>JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "</tt><br />
<tt>#</tt><br />
<tt>#JkOptions indicate to send SSL KEY SIZE,</tt><br />
<tt>JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories</tt><br />
<tt>#</tt><br />
<tt># JkRequestLogFormat set the request format</tt><br />
<tt>JkRequestLogFormat "%w %V %T"</tt></p>
<p>Next, create the file <tt>/etc/apache2/ workers.properties</tt></p>
<p style="padding-left:30px;"><tt>#</tt><br />
<tt># This file provides minimal jk configuration properties needed to</tt><br />
<tt># connect to Tomcat.</tt><br />
<tt>#</tt><br />
<tt># We define a worker named ‘default’</tt><br />
<tt>ps=/</tt><br />
<tt>workers.java_home=/usr/lib/jvm/java-1.5.0-sun/</tt><br />
<tt>worker.list=default</tt><br />
<tt>worker.default.port=8009</tt><br />
<tt>worker.default.host=localhost</tt><br />
<tt>worker.default.type=ajp13</tt><br />
<tt>worker.default.lbfactor=1</tt></p>
<p>Edit the virtual host configuration <tt>/etc/apace2/sites-enabled/one.example.com-http</tt> and add the following just above the line starting with <em>DocumentRoot</em>:</p>
<p style="padding-left:30px;"><tt>JkMount /* default</tt><br />
<tt>JkMount /*.jsp default</tt><br />
<tt>DirectoryIndex index.jsp index.html</tt><br />
<tt># Globally deny access to the WEB-INF directory</tt><br />
<tt>&#60;LocationMatch ‘.*WEB-INF.*’&#62;</tt><br />
<tt>deny from all</tt><br />
<tt>&#60;/LocationMatch&#62;</tt></p>
<p>Repeat the above with the HTTPS virtual host configuration <tt>/etc/apace2/sites-enabled/one.example.com-ssl</tt>.</p>
<p>Restart the Apache2 web server:</p>
<p style="padding-left:30px;"><tt>sudo /etc/init.d/apache2 restart</tt></p>
<p>Now, you should be able to visit the Tomcat start page by directing the browser to either http://one.example.com or https://one.example.com.</p>
<h2>Next Step</h2>
<p>The next step is to <a href="http://steelmon.wordpress.com/2009/10/23/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-4/">get CAS up and running</a></p>
<h2>References</h2>
<p><a href="http://blog.beplacid.net/2007/11/20/howto-apache-2-tomcat-5525-and-mod_jk-under-debian/">http://blog.beplacid.net/2007/11/20/howto-apache-2-tomcat-5525-and-mod_jk-under-debian/</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting up CAS on Tomcat with Apache2 and SSL on Ubuntu - part 2]]></title>
<link>http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-2/</link>
<pubDate>Thu, 22 Oct 2009 13:56:22 +0000</pubDate>
<dc:creator>steelmon</dc:creator>
<guid>http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-2/</guid>
<description><![CDATA[A common scenario when providing services via the web is to expose all applications via an Apache fr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>A common scenario when providing services via the web is to expose all applications via an Apache front end. The Apache server acts as a dispatcher, or reverse proxy, and takes care of virtual hosting as well as any SSL traffic. This way, only one IP address needs to be exposed to the Internet while users gets the experience of multiple stand-alone sites. This article series also describes how applications can be conveniently put behind access control using the Central Authentication Service, or CAS for short.</strong></p>
<h1>Part 2 – Adding SSL support to Apache2 virtual hosts</h1>
<p>In this part of the article series we are going to set up Apache2 so that it is possible to access it through SSL. The Apache2 configuration we are working on is described in <a href="http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-1/">this previous post</a>.</p>
<p>Note that there is a limitation as to how you can configure virtual hosts on HTTPS. Remember that traffic is encrypted when it arrives to the web server. This includes the actual host name in the request URL as well. Thus it is impossible for Apache to know which security certificate to use in order to decrypt the request. There is however something called wildcard certificates – these can be used for domain patterns like <tt>*.example.com</tt>. If we are using a wildcard certificate, i.e. always the same certificate, we can host an arbitrary number of virtual hosts under the domain, and they will all use the same certificate.</p>
<p>Now, let&#8217;s get started. The first thing to do is to make sure Apache2 has the necessary module for serving HTTPS traffic:</p>
<p style="padding-left:30px;"><tt>sudo a2enmod ssl</tt></p>
<p>Next, we need to set up the key and certificate to use for our virtual hosts. This can either be done by purchasing a commercial certificate, or by creating a self-signed certificate. In this article we are going to create a self-signed certificate. This means that anyone accessing our site will get a warning that the root certificate is not trusted, but otherwise it is identical to a commercial certificate. Set up the self-signed certificate by issuing the following commands:</p>
<p style="padding-left:30px;"><tt>sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem<br />
sudo chmod a+r /etc/apache2/ssl/apache.pem</tt></p>
<p>When you issue the second command above, you will be asked for the certificate identity. At this point enter <tt>*.example.com</tt>. The asterisk (<tt>*</tt>) indicates that it is a wildcard certificate that maps to any URL where the host part ends with <tt>example.com</tt></p>
<p>Now we are all set to setup a couple of virtual hosts that will respond to HTTPS requests. Like discussed in the previous post, this is done by adding configuration files into the <tt>/etc/apache2/sites-available</tt> directory. Start with the file <tt>/etc/apache2/sites-available/one.example.com-ssl</tt>:</p>
<p style="padding-left:30px;"><tt>#<br />
#  Virtual host (HTTPS)<br />
#  one.example.com (/var/www/one.example.com)<br />
#<br />
&#60;VirtualHost *:443&#62;<br />
ServerAdmin webmaster@one.example.com<br />
ServerName  one.example.com:443<br />
#<br />
SSLEngine On<br />
SSLCertificateFile /etc/apache2/ssl/apache.pem<br />
#<br />
# Indexes + Directory Root.<br />
DirectoryIndex index.html<br />
DocumentRoot /var/www/one.example.com/htdocs<br />
#<br />
# Logfiles<br />
ErrorLog  /var/www/one.example.com/logs/error.log<br />
CustomLog /var/www/one.example.com/logs/access.log combined<br />
&#60;/VirtualHost&#62;<br />
</tt></p>
<p>Continue with the second host, <tt>/etc/apache2/sites-available/two.example.com-ssl</tt>:</p>
<p style="padding-left:30px;"><tt>#<br />
#  Virtual host (HTTPS)<br />
#  two.example.com (/var/www/two.example.com)<br />
#<br />
&#60;VirtualHost *:443&#62;<br />
ServerAdmin webmaster@two.example.com<br />
ServerName  two.example.com:443<br />
#<br />
SSLEngine On<br />
SSLCertificateFile /etc/apache2/ssl/apache.pem<br />
#<br />
# Indexes + Directory Root.<br />
DirectoryIndex index.html<br />
DocumentRoot /var/www/two.example.com/htdocs<br />
#<br />
# Logfiles<br />
ErrorLog  /var/www/two.example.com/logs/error.log<br />
CustomLog /var/www/two.example.com/logs/access.log combined<br />
&#60;/VirtualHost&#62;<br />
</tt></p>
<p>The two host configurations above point to the same web content directories as their non-SSL counterparts. This is by no means necessary &#8211; they could have pointed to any location, they are in fact different virtual hosts from the perspective of the Apache2 web server.</p>
<p>Finally, lets see it working in action by enabling the sites, restarting Apache and pointing the browser to the new virtual hosts:</p>
<p style="padding-left:30px;"><tt>sudo a2ensite one.example.com-ssl<br />
sudo a2ensite two.example.com-ssl<br />
sudo /etc/init.d/apache2 restart</tt></p>
<p>You should now be able to access https://one.example.com and https://two.example.com and see different content. If you are using a self-signed certificate, like I have described here, you will be asked to override the default security behavior in the browser. Assuming you trust yourself &#8211; go ahead and add the exceptions.</p>
<h2>Next step</h2>
<p>The next step will be to <a href="http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-%e2%80%93-part-3/">add Tomcat to the setup</a> and make Apache2 communicate with the Tomcat backend through the AJP protocol as provided by the mod_jk module.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setting up CAS on Tomcat with Apache2 and SSL on Ubuntu - part 1]]></title>
<link>http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-1/</link>
<pubDate>Thu, 22 Oct 2009 12:54:25 +0000</pubDate>
<dc:creator>steelmon</dc:creator>
<guid>http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-1/</guid>
<description><![CDATA[A common scenario when providing services via the web is to expose all applications via an Apache fr]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>A common scenario when providing services via the web is to expose all applications via an Apache front end. The Apache server acts as a dispatcher, or reverse proxy, and takes care of virtual hosting as well as any SSL traffic. This way, only one IP address needs to be exposed to the Internet while users gets the experience of multiple stand-alone sites. This article series also describes how applications can be conveniently put behind access control using the Central Authentication Service, or CAS for short.</strong></p>
<h1>Part 1 &#8211; Setting up Apache2 for virtual hosting</h1>
<h2>Installing and configuring Apache</h2>
<p>We are going to create an environment where we can host multiple websites with a single server.  This is quite straightforward to do with the use of the Apache web server. We are going to cover the use of the NameVirtualHost directive, which does not require any hard-wiring of IP addresses.  The only thing you need is for your domain names to resolve to the IP address of your webserver.</p>
<p>For example if you have an Apache server running upon the IP address <tt>10.0.1.20</tt> and you wish to host the two sites <tt>one.example.com</tt> and <tt>two.example.com</tt> you&#8217;ll need to make sure that these names resolve to the IP address of your server. If you wish to do this in an isolated environment and avoid setting up DNS records, you can simply add the host names to your <tt>/etc/hosts</tt> file, which should then look something like the following (replacing the IP addresses with the address of your intended server):</p>
<p style="padding-left:30px;"><tt>127.0.0.1    localhost<br />
10.0.1.20    one.example.com<br />
10.0.1.20    two.example.com</tt></p>
<p>After this preparation, the first thing to do is to setup an Apache2 web server. In Ubuntu, it is conveniently located in the repositories:</p>
<p style="padding-left:30px;"><tt>sudo apt-get install apache2</tt></p>
<p>This installs the Apache web server and creates a basic configuration. After installation you should be able to access your newly created server on http://localhost. You should also be able to access the default server site on the addresses http://one.example.com and http://two.example.com.</p>
<p>The next thing to do is to enable virtual hosts in your Apache configuration. The simplest way to do this is to create a file called <tt>/etc/apache2/conf.d/virtual.conf</tt> and include the following content in it:</p>
<p style="padding-left:30px;"><tt>#<br />
#  Handle multiple virtual hosts.<br />
#<br />
NameVirtualHost *:80<br />
NameVirtualHost *:443</tt></p>
<p>This effectively means that you are going to map all requests on port 80 and 443 (HTTPS) to virtual hosts. Note that there is a limitation as to how you can configure virtual hosts on HTTPS. Remember that traffic is encrypted when it arrives to the web server. This includes the actual host name in the request URL as well. Thus it is impossible for Apache to know which security certificate to use in order to decrypt the request. There is however something called wildcard certificates &#8211; these can be used for domain patterns like <tt>*.example.com</tt>. If we are using a wildcard certificate, we can host an arbitrary number of virtual hosts under the domain, and they will all use the same certificate. More on that in a later post.</p>
<p>Next, we need to create the two virtual web sites. All site configurations under apache2 are kept in the directory <tt>/etc/apache2/sites-available</tt>. Start by creating the file <tt>/etc/apache2/sites-available/one.example.com-http</tt>:</p>
<p style="padding-left:30px;"><tt>#<br />
#  Virtual host<br />
#  one.example.com (/var/www/one.example.com)<br />
#<br />
&#60;VirtualHost *:80&#62;<br />
ServerAdmin webmaster@one.example.com<br />
ServerName  one.example.com:80</tt></p>
<p style="padding-left:30px;"><tt># Indexes + Directory Root.<br />
DirectoryIndex index.html<br />
DocumentRoot /var/www/one.example.com/htdocs</tt></p>
<p style="padding-left:30px;"><tt># Logfiles<br />
ErrorLog  /var/www/one.example.com/logs/error.log<br />
CustomLog /var/www/one.example.com/logs/access.log combined<br />
&#60;/VirtualHost&#62;</tt></p>
<p>Note that the directive <tt>ServerName</tt> marks the name of the virtual host, and when Apache receives a request that contains a url with this name, it will be directed to the directory <tt>/var/www/one.example.com/htdocs</tt>. Now, lets do the same with the second virtual host by creating the file <tt>/etc/apache2/sites-available/two.example.com-http</tt>:</p>
<p style="padding-left:30px;"><tt>#<br />
#  Virtual host<br />
#  two.example.com (/var/www/two.example.com)<br />
#<br />
&#60;VirtualHost *:80&#62;<br />
ServerAdmin webmaster@two.example.com<br />
ServerName  two.example.com:80</tt></p>
<p style="padding-left:30px;"><tt># Indexes + Directory Root.<br />
DirectoryIndex index.html<br />
DocumentRoot /var/www/two.example.com/htdocs</tt></p>
<p style="padding-left:30px;"><tt># Logfiles<br />
ErrorLog  /var/www/two.example.com/logs/error.log<br />
CustomLog /var/www/two.example.com/logs/access.log combined<br />
&#60;/VirtualHost&#62;</tt></p>
<p>The last thing to do is to create a directory structure and some content to display for the sites:</p>
<p style="padding-left:30px;"><tt>sudo mkdir /var/www/one.example.com/htdocs<br />
sudo mkdir /var/www/one.example.com/logs<br />
sudo mkdir /var/www/two.example.com/htdocs<br />
sudo mkdir /var/www/two.example.com/logs<br />
sudo echo "site one.example.com" &#62; /var/www/one.example.com/htdocs/index.html<br />
sudo echo "site two.example.com" &#62; /var/www/one.example.com/htdocs/index.html</tt></p>
<p>Finally, lets enable the sites, restart apache and see the result. Enabling the sites boils down to creating symbolic links in the <tt>/etc/apache2/sites-enabled</tt> directory. These are automatically included by Apache when the configuration is loaded. For convenience there is  a script available that creates the link for us:</p>
<p style="padding-left:30px;"><tt>sudo a2ensite one.example.com-http<br />
sudo a2ensite two.example.com-http<br />
sudo /etc/init.d/apache2 restart</tt></p>
<p>Now, direct the browser to http://one.example.com, followed by http://two.example.com. You should be greeted by two different web sites. Voila!</p>
<h2>Next step</h2>
<p>The next step is to <a href="http://steelmon.wordpress.com/2009/10/22/setting-up-cas-on-tomcat-with-apache2-and-ssl-on-ubuntu-part-2/">enable SSL with the use of a wildcard certificate</a></p>
<h2>References</h2>
<p><a href="http://www.debian-administration.org/articles/412">http://www.debian-administration.org/articles/412</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Directive MaxClients de Apache2]]></title>
<link>http://beeznest.wordpress.com/2009/10/21/directive-maxclients-de-apache2/</link>
<pubDate>Tue, 20 Oct 2009 22:07:24 +0000</pubDate>
<dc:creator>ywarnier</dc:creator>
<guid>http://beeznest.wordpress.com/2009/10/21/directive-maxclients-de-apache2/</guid>
<description><![CDATA[Un article particulièrement intéressant au sujet de l&#8217;optimisation d&#8217;Apache2 peut être t]]></description>
<content:encoded><![CDATA[Un article particulièrement intéressant au sujet de l&#8217;optimisation d&#8217;Apache2 peut être t]]></content:encoded>
</item>
<item>
<title><![CDATA[instalasi Subversion pada openSUSE]]></title>
<link>http://atmahadli.wordpress.com/2009/10/14/instalasi-subversion-pada-opensuse/</link>
<pubDate>Wed, 14 Oct 2009 03:19:05 +0000</pubDate>
<dc:creator>d_anank</dc:creator>
<guid>http://atmahadli.wordpress.com/2009/10/14/instalasi-subversion-pada-opensuse/</guid>
<description><![CDATA[Subversion adalah suatu software atau tool yang bisa memudakan para developer dalam mengerjakan suat]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Subversion adalah suatu software atau tool yang bisa memudakan para developer dalam mengerjakan suatu project yang besar dan dikerjakan secara tim atau bersama2.</p>
<p>Sebelumnya untuk instalasi bisa dibaca di file &#8220;README.SuSE&#8221; di directory &#8220;/usr/share/doc/packages/subversion/&#8221;<br />
atmahadli:/home/ahsani # cat /usr/share/doc/packages/subversion/README.SuSE</p>
<p>1. backup and restore your repository datasubversi repositori menggunakan salah satu sistem database Berkeley perpustakaan, atau database FSFS format yang datang dengan paket subversi itu sendiri. Karena sistem BDB perpustakaan sering memperkenalkan format yang tidak kompatibel baru selama upgrade versi, sebuah backup / restore dari semua repositori subversi harus dilakukan sebelum melakukan upgrade sistem seperti.<br />
&#8216;<strong>svnadmin dump</strong>&#8216; akan menulis repositori ke stdout dalam sebuah format &#8216;dumpfile&#8217;. dumpfile ini dapat diload kemudian dengan &#8216;<strong>svnadmin load</strong>&#8216;.<!--more--></p>
<p>2. create svn user/group for svnserve<br />
subversion repositori dapat disajikan baik melalui http, atau melalui svnserve daemon dan sebuah protokol jaringan khusus. svnserve tidak boleh menjalankan sebagai root user. Startup script rcsvnserve mengharapkan user / grup bernama &#8217;svn&#8217;, dapat dikonfigurasi melalui /etc/sysconfig/svnserve. Tapi user/grup harus diciptakan sebelum penggunaan svn:<br />
<code>useradd svn<br />
groupadd svn</code></p>
<p>3. mini-howto for 2 projects<br />
Untuk menjalankan server subversion, Anda perlu mengkonfigurasi apache2 untuk memuat dua modul apache2: mod_dav dan mod_dav_svn. (mod_dav diperlukan oleh mod_dav_svn, tersebut akan diinstal bersama dengan apache2.)<br />
Hal ini dilakukan dengan menambahkan dav dan dav_svn modul ke konfigurasi apache2 (a2enmod dav; a2enmod dav_svn), dan me-restart server. Sebuah default/contoh konfigurasi modul dav_svn dapat ditemukan di /etc/apache2/conf.d/subversion.conf. Dengan paket apache lebih baru, konfigurasi ini <strong>tidak</strong> load secara otomatis oleh server apache, karena banyak orang mengkonfigurasi virtual host dan agaknya mustahil bahwa repositori harus tersedia dari setiap virtual host. Untuk memuat konfigurasi untuk virtual host tertentu, tambahkan Include /etc/apache2/conf.d/subversion.conf atau Sertakan /path/ke/konfigurasi_subversion_anda di masing-masing konfigurasi virtual host. Ini mungkin dilakukan di default virtual host (/etc/apache2/default-server.conf).</p>
<p>contoh kecil:<br />
Rencananya:<br />
host dengan 2 proyek sumber subversi anonim keduanya harus memiliki akses membaca keduanya harus memiliki akses tulis terbatas untuk beberapa pengguna mereka hanya diakses melalui HTTP, bukan (!) secara lokal mereka akan diakses melalui:<br />
<code>http://hostname/repos/project1<br />
http://hostname/repos/project2</code><br />
Keduanya akan memiliki versi resmi dari pohon(tree) sumber dan versi modifikasi untuk distribusi. Proyek yang dimaksud adalah: project1 dan project2<br />
Realisasi: menemukan suatu mesin untuk menjadi tuan rumah proyek. Jauhkan backup (dan restore) Dalam pikiran ketika mencari hardware.<br />
menginstal paket yang dibutuhkan<br />
Anda bisa memeriksa update paket di<br />
<code>ftp://ftp.suse.com/pub/projects/apache/<br />
rpm -Uvh \<br />
apache2 \<br />
apache2-doc \<br />
apache2-prefork \<br />
libapr1 \<br />
libapr-util1 \<br />
neon \<br />
subversion \<br />
subversion-doc \<br />
subversion-server</code><br />
update /etc/sysconfig/apache2 dengan menambahkan &#8216;dav dav_svn&#8217; ke $APACHE_MODULES:<br />
<code>a2enmod dav<br />
a2enmod dav_svn</code></p>
<p>buat directory untuk tempat repository svn:<br />
<code>mkdir -p /srv/svn/repos<br />
mkdir -p /srv/svn/user_access<br />
mkdir -p /srv/svn/html</code></p>
<p>menambahklan repository data untuk http. edit file /etc/apache2/conf.d/subversion.conf:<br />
<code><br />
#--------------------------------------------------<br />
#<br />
# project related HTML files<br />
#<br />
&#60;IfModule mod_alias.c&#62;<br />
Alias /repos    "/srv/svn/html"<br />
&#60;/IfModule&#62;<br />
&#60;Directory /srv/svn/html&#62;<br />
Options         +Indexes +Multiviews -FollowSymLinks<br />
IndexOptions    FancyIndexing \<br />
ScanHTMLTitles \<br />
NameWidth=* \<br />
DescriptionWidth=* \<br />
SuppressLastModified \<br />
SuppressSize<br />
order allow,deny<br />
allow from all<br />
&#60;/Directory&#62;</code></p>
<p><code> </code></p>
<p><code># project repository files for project1<br />
&#60;Location /repos/project1&#62;<br />
DAV svn<br />
SVNPath /srv/svn/repos/project1<br />
# Limit write access to certain people<br />
AuthType Basic<br />
AuthName "Authorization for project1 required"<br />
AuthUserFile /srv/svn/user_access/project1_passwdfile<br />
AuthGroupFile /srv/svn/user_access/project1_groupfile<br />
&#60;LimitExcept GET PROPFIND OPTIONS REPORT&#62;<br />
Require group project1_committers<br />
&#60;/LimitExcept&#62;<br />
# Limit read access to certain people<br />
&#60;Limit GET PROPFIND OPTIONS REPORT&#62;<br />
Require group project1_committers<br />
Require group project1_readers<br />
&#60;/Limit&#62;<br />
&#60;/Location&#62;<br />
# project repository files for project2<br />
&#60;Location /repos/project2&#62;<br />
DAV svn<br />
SVNPath /srv/svn/repos/project2<br />
# Limit write permission to list of valid users.<br />
&#60;LimitExcept GET PROPFIND OPTIONS REPORT&#62;<br />
# Require SSL connection for password protection.<br />
# SSLRequireSSL<br />
AuthType Basic<br />
AuthName "Authorization for project2 required"<br />
AuthUserFile /srv/svn/user_access/project2_passwdfile<br />
Require valid-user<br />
&#60;/LimitExcept&#62;<br />
&#60;/Location&#62;<br />
#--------------------------------------------------<br />
</code><br />
buat repository baru:<br />
<code>cd /srv/svn/repos<br />
svnadmin create project1<br />
chown -R wwwrun:www project1/{dav,db,locks}<br />
svnadmin create project2<br />
chown -R wwwrun:www project2/{dav,db,locks}</code><br />
Restart webserver(apache):<br />
<code>rcapache2 restart</code><br />
Sekarang buat user untuk bisa akses ke reopository svn:<br />
project1 adalah project yang aksesnya dibatasi(restricted).<br />
untuk melihat/mengupdate juga juga membutuhkan password<br />
<code>touch /srv/svn/user_access/project1_passwdfile<br />
chown root:www /srv/svn/user_access/project1_passwdfile<br />
chmod 640 /srv/svn/user_access/project1_passwdfile<br />
htpasswd2 /srv/svn/user_access/project1_passwdfile olaf<br />
htpasswd2 /srv/svn/user_access/project1_passwdfile olh</code><br />
dan buat group untuk project1 pada file /srv/svn/user_access/project1_groupfile<br />
dengan isi:<br />
project1_committers: olh<br />
project1_readers: olaf olh<br />
project2 dapat dilihat oleh semua pengakses, tetapi hanya beberapa yang bisa commit.<br />
<code>touch /srv/svn/user_access/project2_passwdfile<br />
chown root:www /srv/svn/user_access/project2_passwdfile<br />
chmod 640 /srv/svn/user_access/project2_passwdfile<br />
htpasswd2 /srv/svn/user_access/project2_passwdfile olaf</code></p>
<p>seharusnya anda sudah bisa connect ke svn:<br />
<code>http://host/repos/project2<br />
http://host/repos/project1</code><br />
sekarang import data untuk commit ke svn:<br />
<code>svn import /path/to/project2-tree http://host/repos/project2</code></p>
<p>selamat mencoba terimakasih<br />
[atm.d_anank]</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Senior Systems Administrator and Operations Engineer needed]]></title>
<link>http://mindsourceinc.wordpress.com/2009/10/13/senior-systems-administrator-and-operations-engineer-needed/</link>
<pubDate>Wed, 14 Oct 2009 00:53:35 +0000</pubDate>
<dc:creator>Michelle</dc:creator>
<guid>http://mindsourceinc.wordpress.com/2009/10/13/senior-systems-administrator-and-operations-engineer-needed/</guid>
<description><![CDATA[Our client in Redwood City, CA is in need of a seasoned system administrator and operations engineer]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Our client in<strong> Redwood City, CA</strong> is in need of a seasoned system administrator and operations engineer to manage, maintain and support multiple environments supporting several different architectures and environments. The successful candidate will have strong exposure to large web site deployments with multiple tiers include web front-ends, middleware components, backend services, data storage systems and 2nd/3rd tier components like caching and search layers.</p>
<p><strong>Requirements:</strong></p>
<ul>
<li>7 years Linux admin experience</li>
<li>5 years RHEL admin experience</li>
<li>5 years RPM management and admin experience</li>
<li>3 years working with MySQL</li>
<li>Sound understanding of web services and related technologies (HTTP, REST, XML, JSON, etc)</li>
<li>Experience with Linux web servers (Apache2, nginx, lighttpd, etc)</li>
<li>Experience with monitoring systems and components (nagios, cacti, etc)</li>
<li>Exposure to scripting languages such as Perl, Python, etc.</li>
</ul>
<p><strong>Really nice-to-haves but not required:</strong></p>
<ul>
<li>Experience with Erlang</li>
<li>Experience with Ruby on Rails</li>
<li>Exposure to Jabber/XMPP</li>
<li>Exposure to distributed / grid computing</li>
<li>ejabberd administration and configuration</li>
<li>Experience with second and third tier services and components like memcached (or like systems), search applications (lucene, xapian, sphinx, etc), etc.</li>
</ul>
<p><strong>Realistically, these are also nice to haves but not required:</strong></p>
<ul>
<li>Exposure to functional programming languages.</li>
<li>Exposure to the Facebook Platform, Open Social and or other web services and systems</li>
<li>Comfortable working in an Agile work environment.</li>
<li>Plays games and occasionally keeps tabs on the gaming world/industry.</li>
</ul>
<p>If interested, please send us your resume along with the rate per hour, contact number, and availability for a phone interview to <a href="mailto:raj@mindsource.com?subject=I am interested in the Systems Administrator and Operations Engineer position">raj@mindsource.com</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Apache2 - Não listar conteúdo de diretórios]]></title>
<link>http://troliveira.wordpress.com/2009/10/01/apache2-nao-listar-conteudo-de-diretorios/</link>
<pubDate>Thu, 01 Oct 2009 19:07:24 +0000</pubDate>
<dc:creator>Tiago Roberto de Oliveira</dc:creator>
<guid>http://troliveira.wordpress.com/2009/10/01/apache2-nao-listar-conteudo-de-diretorios/</guid>
<description><![CDATA[Se você instalou o apache, e você não deseja que seus visitantes vejam todo o conteúdo de uma pasta ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Se você instalou o apache, e você não deseja que seus visitantes vejam todo o conteúdo de uma pasta que não contém o arquivo index.php ou index.htm, edite o arquivo <em>/etc/apache2/sites-available/nome_do_seu_site</em> e insira o conteúdo  <em>Options -Indexes</em> abaixo da linha <em>DocumentRoot</em>. Segue abaixo os passos:</p>
<p><code>vim /etc/apache2/sites-available/nome_do_seu_site</code></p>
<p>2) Conteúdo do arquivo  <em>/etc/apache2/sites-available/nome_do_seu_site</em>:<br />
<code>&#60;VirtualHost *&#62;<br />
 ServerAdmin seu_email@seu_site_com_br<br />
ServerName seu_dominio.com.br<br />
ServerAlias www.seu_dominio.com.br</code></p>
<p><code># Indexes + Directory Root.<br />
DirectoryIndex index.html index.htm index.php<br />
DocumentRoot /var/www/pasta_do_seu_site/<br />
<strong>Options -Indexes</strong><br />
# CGI Directory<br />
ScriptAlias /cgi-bin/ /var/www/pasta_do_seu_site/cgi-bin/</code></p>
<p><code>Options +ExecCGI<br />
# Logfiles<br />
ErrorLog /var/log/apache2/nome_do_seu_site.error.log<br />
CustomLog /var/log/apache2/nome_do_seu_site.access.log combined</code></p>
<p><code>&#60;/VirtualHost&#62;</code></p>
<p>Espero que este post seja útil.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Setup Subversion with Apache 2 in Ubuntu]]></title>
<link>http://dhydrated.wordpress.com/2009/09/23/setup-subversion-with-apache-2-in-ubuntu/</link>
<pubDate>Wed, 23 Sep 2009 03:41:24 +0000</pubDate>
<dc:creator>dhydrated</dc:creator>
<guid>http://dhydrated.wordpress.com/2009/09/23/setup-subversion-with-apache-2-in-ubuntu/</guid>
<description><![CDATA[Related softwares: Ubuntu 9.04 Subversion 1.6.x Apache2 First, if you haven&#8217;t install Apache2 ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Related softwares:</p>
<ol>
<li>Ubuntu 9.04</li>
<li>Subversion 1.6.x</li>
<li>Apache2</li>
</ol>
<p>First, if you haven&#8217;t install Apache2 and Apache2-Subversion-library, you can do so by typing below:</p>
<pre class="brush: bash;">
sudo apt-get install apache2 apache2lib-svn
</pre>
<p>Then, edit the apache2-svn file in <strong>/etc/apache2/mods-available/dav_svn.conf</strong>.<br />
Enter the following entry into the file and replace the variables with the square-bracket [xxx] with your value accordingly.</p>
<pre class="brush: bash;">
&#60;Location [SVN_URL_PATH]&#62;
DAV svn
SVNParentPath [SVN_PARENT_PATH]
AuthName &#34;[SVN_REPOSITORY_NAME]&#34;
AuthUserFile [AUTHENTICATION_FILE_PATH]
Require valid-user
&#60;/Location&#62;
</pre>
<p>If you wish to have the repository URL such as <strong>http://hostname/svn</strong>, then replace the <strong>[SVN_URL_PATH]</strong> with <strong>/svn</strong>. Replaced the <strong>[SVN_PARENT_PATH] </strong>with the parent path of your Subversion repository. If you place your repository named projects in <strong>/var/www/svn_root/projects</strong>, then replace it with <strong>/var/www/svn_root</strong>. Replace the <strong>[SVN_REPOSITORY_NAME] </strong>with any name that you wish. Lastly, replace<strong> [AUTHENTICATION_FILE_PATH]</strong><strong> </strong>with the absolute path of your authentication file, which we will create later. Let say we will create the file in <strong>/var/www/svn_root</strong> which named <strong>mypasswd</strong>. Then replace it with<strong> /var/www/svn_root/mypasswd</strong>.</p>
<p>To create the authentication file with a user named<strong> dhydrated</strong>, type the following:</p>
<pre class="brush: bash;">
htpasswd -c /var/www/svn_root/mypasswd dhydrated
</pre>
<p>To modify existing authentication file with a user named <strong>dhydrated</strong>, type the following:</p>
<pre class="brush: bash;">
htpasswd -m /var/www/svn_root/mypasswd dhydrated
</pre>
<p>Restart your Apache2 server by typing:</p>
<pre class="brush: bash;">
sudo /etc/init.d/apache2 restart
</pre>
<p>If everything went well, you should be able to access your repository via <strong>http://hostname/svn/projects</strong>, and a dialog box will be prompted to ask for your username and password as you put in the authentication file.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Configurando múltiplos domínios no Ubuntu.804 e Apache2]]></title>
<link>http://troliveira.wordpress.com/2009/09/22/configurando-multiplos-dominios-no-ubuntu-804-e-apache2/</link>
<pubDate>Tue, 22 Sep 2009 14:10:27 +0000</pubDate>
<dc:creator>Tiago Roberto de Oliveira</dc:creator>
<guid>http://troliveira.wordpress.com/2009/09/22/configurando-multiplos-dominios-no-ubuntu-804-e-apache2/</guid>
<description><![CDATA[Ótima dica de como configurar o Apache2 para responder por múltiplos domínios em pastas diferentes. ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ótima dica de como configurar o Apache2 para responder por múltiplos domínios em pastas diferentes.</p>
<p><a href="http://www.corey-m.com/blog/?p=315" target="_blank">http://www.corey-m.com/blog/?p=315</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[PHP &amp; Snow Leopard]]></title>
<link>http://stuffthatinterestsme.wordpress.com/2009/09/21/php-snow-leopard/</link>
<pubDate>Mon, 21 Sep 2009 21:17:51 +0000</pubDate>
<dc:creator>ivantis</dc:creator>
<guid>http://stuffthatinterestsme.wordpress.com/2009/09/21/php-snow-leopard/</guid>
<description><![CDATA[Wat? PHP sends as plain text in Snow Leopard? Reinstall PHP: http://www.entropy.ch/software/macosx/p]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Wat? PHP sends as plain text in Snow Leopard? Reinstall PHP: <a href="http://www.entropy.ch/software/macosx/php/" target="_blank">http://www.entropy.ch/software/macosx/php/</a></p>
<p>Now apache doesn&#8217;t work? Edit /etc/apache2/httpd.conf, uncomment #LoadModule php5_module        libexec/apache2/libphp5.so (make it just LoadModule php5_module        libexec/apache2/libphp5.so). Now go into System Preferences-&#62;Sharing, uncheck then recheck Web Sharing</p>
<p>Now it should work. For some reason, that line being commented out causes a segfault when you request anything besides a directory listing.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Solved] ssl_error_rx_record_too_long]]></title>
<link>http://wildanm.wordpress.com/2009/09/17/ssl_error_rx_record_too_long/</link>
<pubDate>Thu, 17 Sep 2009 06:01:04 +0000</pubDate>
<dc:creator>Wildan Maulana</dc:creator>
<guid>http://wildanm.wordpress.com/2009/09/17/ssl_error_rx_record_too_long/</guid>
<description><![CDATA[Update : After disable all the virtual host, and enable only the secure one (using the configuration]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Update : </strong></p>
<p>After disable all the virtual host, and enable only the secure one (using the configuration below), everything work as expected.</p>
<p>To make sure, the server talk in a secure mode (using ssl), try access the server using http://</p>
<p><strong>http://openthinklabs.wm:443</strong></p>
<p>If you receive a bad request information from the browser, like the one below :</p>
<p><a href="http://wildanm.wordpress.com/files/2009/09/bad_request.png"><img src="http://wildanm.wordpress.com/files/2009/09/bad_request.png" alt="bad_request" title="bad_request" width="500" height="312" class="aligncenter size-full wp-image-1009" /></a></p>
<p>Your ssl configuration is correct. </p>
<p>If you see plain text, you willl get <strong>ssl_error_rx_record_too_long</strong> error when accessing the page using https. </p>
<hr />
<p>After following tutorial at [1] i get ssl_error_rx_record_too_long error. </p>
<p><a href="http://wildanm.wordpress.com/files/2009/09/ssl_error_rx_record_too_long.png"><img src="http://wildanm.wordpress.com/files/2009/09/ssl_error_rx_record_too_long.png" alt="ssl_error_rx_record_too_long" title="ssl_error_rx_record_too_long" width="500" height="312" class="aligncenter size-full wp-image-1006" /></a>. </p>
<p>Didn&#8217;t find any solution yet &#8230;</p>
<p>Here is my virtual host setting :</p>
<pre class="brush: php;">
NameVirtualHost *:443
&lt;VirtualHost *:443&gt;
	ServerAdmin wildan.m@gmail.com
        ServerName openthinklabs.wm

	DocumentRoot /home/wildan/jobstuff/OpenThinkLabs/webapps/openthinklabs

	&lt;Directory &quot;/home/wildan/jobstuff/OpenThinkLabs/webapps/openthinklabs&quot;&gt;
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
		# This directive allows us to have apache2's default start page
                # in /apache2-default/, but still have / go to the right place
                #RedirectMatch ^/$ /apache2-default/
	&lt;/Directory&gt;

	ErrorLog /var/log/apache2/openthinklabs_error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel debug

	CustomLog /var/log/apache2/openthinklabs.log combined
ServerSignature On

SSLEngine On
SSLCertificateFile /etc/apache2/ssl.cert/server.crt
SSLCertificateKeyFile /etc/apache2/ssl.key/server.key

#SSLCertificateChainFile /etc/apache2/ssl.cert/my-ca.crt
#SSLCACertificateFile /etc/apache2/ssl.cert/my-ca.crt

JkMount /alfresco ajp13
JkMount /alfresco/* ajp13

JkMount /cas ajp13
JkMount /cas/* ajp13

&lt;Location /alfresco&gt;
AuthType CAS
AuthName &quot;CAS&quot;
require valid-user
CASScope /alfresco
&lt;/Location&gt;

&lt;Location /share&gt;
AuthType CAS
AuthName &quot;CAS&quot;
require valid-user
CASScope /share
&lt;/Location&gt;

&lt;Location /examples&gt;
AuthType CAS
AuthName &quot;CAS&quot;
require valid-user
CASScope /examples
&lt;/Location&gt;

&lt;/VirtualHost&gt;
</pre>
<p><strong>References :</strong></p>
<p>[1]. <a href="http://www.tc.umn.edu/~brams006/selfsign.html">http://www.tc.umn.edu/~brams006/selfsign.html</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Trac - zarządzanie projektem - instalacja Windows]]></title>
<link>http://zenedith.wordpress.com/2009/09/13/trac-zarzadzanie-projektem-instalacja-windows/</link>
<pubDate>Sun, 13 Sep 2009 15:28:59 +0000</pubDate>
<dc:creator>zenedith</dc:creator>
<guid>http://zenedith.wordpress.com/2009/09/13/trac-zarzadzanie-projektem-instalacja-windows/</guid>
<description><![CDATA[TRAC to system pomocny przy zarządzanie projektami. Jego możliwości są naprawdę spore, ja postaram s]]></description>
<content:encoded><![CDATA[TRAC to system pomocny przy zarządzanie projektami. Jego możliwości są naprawdę spore, ja postaram s]]></content:encoded>
</item>
<item>
<title><![CDATA[Installing SVN and TRAC in Ubuntu 9.04 with Apache2 SSL]]></title>
<link>http://somepalli.wordpress.com/2009/09/11/installing-svn-and-trac-in-ubuntu-9-04-with-apache2-ssl/</link>
<pubDate>Fri, 11 Sep 2009 11:28:04 +0000</pubDate>
<dc:creator>somepalli</dc:creator>
<guid>http://somepalli.wordpress.com/2009/09/11/installing-svn-and-trac-in-ubuntu-9-04-with-apache2-ssl/</guid>
<description><![CDATA[This tutorial will guide you through installation of Apache, HTTPS, Subversion and Trac, in order to]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>This tutorial will guide you through installation of Apache, HTTPS, Subversion and Trac, in order to have an (almost) complete development environment for your team.</p>
<p>This article is divided in following steps</p>
<p>1. Installing Subversion<br />
2. Installing Apache<br />
3. Configuring Apache with SSL<br />
4. Configuring Subversion with Apache (and SSL)<br />
5. Installing Trac</p>
<p>You may choose for example to see how to install Apache and SSL, or having Apache plus subversion without Trac.<br />
Steps are voluntary isolated, and will require more operations than, for instance, issuing an &#8220;apt-get install trac&#8221; that will download and install all the packages in one step; but this will hopefully allow the readers to choose picking one section and forget about unneeded components.<br />
I&#8217;ll not explain what Subversion is, or what SSL is, etc. Ask google, for this info: I just say that for your software project you may need a server with those tools ready for your team.</p>
<h3>Requirements</h3>
<p>You need Ubuntu 9.04, in my case I used the &#8220;desktop edition&#8221; 32bit. But possibly this tutorial should be valid for Debian and previous Ubuntu version; but I have not verified that: if you do, post a comment to report your experience.</p>
<h3>Preparation</h3>
<p>After installing your server you have to ensure that apt system is up to date with available software on the repositories. Type the following command:</p>
<blockquote><p><em>$ sudo apt-get update</em></p></blockquote>
<p>upgrading installed packages may be a good idea to do now:</p>
<blockquote><p><em>$ sudo apt-get upgrade</em></p></blockquote>
<p>Answer Yes if asked to download and install the upgrades.</p>
<h3>1. Installing Subversion</h3>
<p>From the command line type the command:</p>
<blockquote><p><em>$ sudo apt-get install subversion </em></p></blockquote>
<p>If everything went fine you should able to verify the Subversion version installed with following command:</p>
<blockquote><p><em>$ svn &#8211;version</em></p>
<p><em>svn, version 1.5.4 (r33841)<br />
compiled Aug  7 2009, 01:44:11</em></p>
<p><em>Copyright (C) 2000-2008 CollabNet.<br />
Subversion is open source software, see http://subversion.tigris.org/<br />
This product includes software developed by CollabNet (http://www.Collab.Net/).</em></p>
<p><em>The following repository access (RA) modules are available:</em></p>
<p><em>* ra_neon : Module for accessing a repository via WebDAV protocol using Neon.<br />
- handles &#8216;http&#8217; scheme<br />
- handles &#8216;https&#8217; scheme<br />
* ra_svn : Module for accessing a repository using the svn network protocol.<br />
- with Cyrus SASL authentication<br />
- handles &#8217;svn&#8217; scheme<br />
* ra_local : Module for accessing a repository on local disk.<br />
- handles &#8216;file&#8217; scheme</em></p>
<p>For now, let&#8217;s stop here: how to create the Subversion repository, configure the users etc. Will be explained later in conjunction with Apache2 configuration. Maybe I&#8217;ll write something on how to deal with svnserve, svnadmin, and user access control, in another article.</p></blockquote>
<p>Later we will see how to create a repository, configure it with apache and HTTP basic authentication.</p>
<h3></h3>
<h3>2. Installing Apache</h3>
<p>To install apache 2 type the command:</p>
<blockquote><p><em>$ sudo apt-get install apache</em></p></blockquote>
<p>When finished you should be able to connect with the browser at <a href="http://localhost/">http://localhost</a> and see the message &#8220;It works!&#8221;. Or you may verify that at the command line installing and using curl:</p>
<blockquote><p><em>$ sudo apt-get install curl</em></p></blockquote>
<blockquote><p><em>$ curl http://localhost<br />
&#60;html&#62;&#60;body&#62;&#60;h1&#62;It works!&#60;/h1&#62;&#60;/body&#62;&#60;/html&#62;</em></p></blockquote>
<h3>3. Configuring Apache with SSL</h3>
<p>Now we want to configure apache to run HTTPs.<br />
Following command will enable ssl Apache2 module with a2enmod (cryptic name for &#8220;Apache2 enable module&#8221;:</p>
<blockquote><p><em>$ sudo a2enmod ssl</em></p></blockquote>
<p>The previous command will suggest you to restart apache to let it to reload the configuration; ignore that message for now.</p>
<p>We need to enable the HTTPS port (443). Edit /etc/apache2/ports.conf and ensure that port 443 is defined as follows:</p>
<blockquote><p><em>$ sudo gedit /etc/apache2/ports.conf</em></p></blockquote>
<blockquote><p><em># If you just change the port or add more ports here, you will likely also<br />
# have to change the VirtualHost statement in<br />
# /etc/apache2/sites-enabled/000-default<br />
# This is also true if you have upgraded from before 2.2.9-3 (i.e. from<br />
# Debian etch). See /usr/share/doc/apache2.2-common/NEWS.Debian.gz and<br />
# README.Debian.gz</em></p>
<p><em>NameVirtualHost *:80<br />
Listen 80</em></p>
<p><em>&#60;IfModule mod_ssl.c&#62;<br />
# SSL name based virtual hosts are not yet supported, therefore no<br />
# NameVirtualHost statement here<br />
NameVirtualHost *:443<br />
Listen 443<br />
&#60;/IfModule&#62;</em></p></blockquote>
<p>I added the clause NameVirtualHost *:443 in the for SSL; this is not strictly necessary but it will be useful later if you want to have a VirtualHost for trac and other development services.</p>
<p>Now we need to configure the SSL site. Fortunately we have already the configuration file for that, we just need to enable it with a2ensite (cryptic name for &#8220;apache2 enable site&#8221;)</p>
<blockquote><p><em>$ sudo a2ensite default-ssl</em></p></blockquote>
<p>Again, the above command will suggest to reload apache configuration to activate the changes. This time the suggestion is almost right. As we made several changes I prefer to restart apache with following command:</p>
<blockquote><p><em>sudo /etc/init.d/apache2 restart<br />
* Restarting web server apache2 </em></p>
<p><em>apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.1.1 for ServerName<br />
&#8230; waiting apache2: Could not reliably determine the server&#8217;s fully qualified domain name, using 127.0.1.1 for ServerName</em></p></blockquote>
<p>If everything went fine you should see the above warning. You can ignore it, unless you want to configure the ServerName for your server. But this is out of scope, so do a search on Google, or consult an Apache expert.</p>
<p>So, if everything went fine, now we should be able to connect to our server through SSL.<br />
You can use firefox or curl, as before, but this time the URL will be <a href="https://localhost/">https://localhost</a></p>
<blockquote><p><em>$ curl -k https://localhost<br />
&#60;html&#62;&#60;body&#62;&#60;h1&#62;It works!&#60;/h1&#62;&#60;/body&#62;&#60;/html&#62;</em></p></blockquote>
<p>the -k option is to ignore certification validation. Also firefox will complain that our certificate is invalid, but you can add it to exceptions and it will nomore bug you with those messages.</p>
<p>If everything went fine, now we should have Apache2, HTTP and HTTPs ready.</p>
<h3>4. Configuring Subversion with Apache (and SSL)</h3>
<p>First of all, we need to install the Subversion modules for Apache2.</p>
<blockquote><p><em>$ sudo apt-get install libapache2-svn</em></p></blockquote>
<p>They will be enabled by default. So you don&#8217;t need to run a2enmod.</p>
<p>We only need to configure a repository. Let&#8217; say our project is called &#8216;myproject&#8217;.</p>
<p>First of all, let&#8217;s decide where our svn repositories will be created. I like /var/local/svn :</p>
<blockquote><p><em>$ sudo mkdir /var/local/svn/</em></p></blockquote>
<p>Then let&#8217;s create the repository using following procedure:</p>
<blockquote><p><em>$ sudo mkdir /var/local/svn/myproject<br />
$ sudo chown www-data:www-data /var/local/svn/myproject<br />
$ sudo -u www-data svnadmin create /var/local/svn/myproject</em></p></blockquote>
<p>Above commands will ensure that the user www-data (which is the apache user) can fully access the repository for reading and updating it.</p>
<p>We need to configure the repository in Apache. Edit /etc/apache2/mods-available/dav_svn.conf using:</p>
<blockquote><p><em>$ sudo gedit /etc/apache2/mods-available/dav_svn.conf</em></p></blockquote>
<p>And add a section like the following one:</p>
<blockquote><p><em>&#60;Location /svn/myproject&#62;<br />
DAV svn<br />
SVNPath /var/local/svn/myproject<br />
AuthType Basic<br />
AuthName &#8220;My Project Subversion Repository&#8221;<br />
AuthUserFile /etc/subversion/myproject.passwd<br />
&#60;LimitExcept GET PROPFIND OPTIONS REPORT&#62;<br />
Require valid-user<br />
&#60;/LimitExcept&#62;<br />
&#60;/Location&#62;</em></p></blockquote>
<p>In the above file we indicated that, at the location svn our repository should respond. And for updating the repository we want a valid user. As per above configuration anonymous consultation is allowed; but you can disable it commenting with a leading &#8216;#&#8217; the lines &#60;LimitExcept &#8230; and &#60;/LimitExcept&#62; or just removing them as in following example:</p>
<blockquote><p><em>&#60;Location /svn/myproject&#62;<br />
DAV svn<br />
SVNPath /var/local/svn/myproject<br />
AuthType Basic<br />
AuthName &#8220;My Project Subversion Repository&#8221;<br />
AuthUserFile /etc/subversion/myproject.passwd<br />
#&#60;LimitExcept GET PROPFIND OPTIONS REPORT&#62;<br />
Require valid-user<br />
#&#60;/LimitExcept&#62;<br />
&#60;/Location&#62;</em></p></blockquote>
<p>The above configuration indicates to Apache that even for consulting the repository we want a valid user.<br />
But valid users need a password, and in fact we indicated a password file for our repository called /etc/subversion/myproject.passwd. So let&#8217;s create a password file with a couple of users:</p>
<blockquote><p><em>$ sudo htpasswd -c /etc/subversion/myproject.passwd luigi<br />
$ sudo htpasswd /etc/subversion/myproject.passwd mario</em></p></blockquote>
<p>The -c option indicates that the password file should be created as new; and it is only necessary for the first user. Be aware of the fact that -c overwrites the existing password file without asking anything. Personally I think this is a quite stupid behavior, but that&#8217;s the way it is.</p>
<p>Now we should be ready.</p>
<p>Let&#8217;s reload apache configuration to make the changes effective:</p>
<blockquote><p><em>$ sudo /etc/init.d/apache2 reload</em></p></blockquote>
<p>and let&#8217;s test with the browser that our svn repository is now accessible through HTTP and HTTPs at following urls:<br />
<a href="http://localhost/svn/myproject/">http://localhost/svn/myproject/</a><br />
<a href="https://localhost/svn/myproject/">https://localhost/svn/myproject/</a></p>
<p>We can also use curl to verify it is working:</p>
<blockquote><p><em>$ curl http://username:password@localhost/svn/myproject/<br />
&#60;html&#62;&#60;head&#62;&#60;title&#62;myproject &#8211; Revision 0: /&#60;/title&#62;&#60;/head&#62;<br />
&#60;body&#62;<br />
&#60;h2&#62;myproject &#8211; Revision 0: /&#60;/h2&#62;<br />
&#60;ul&#62;<br />
&#60;/ul&#62;<br />
&#60;hr noshade&#62;&#60;em&#62;Powered by &#60;a href=&#8221;http://subversion.tigris.org/&#8221;&#62;Subversion&#60;/a&#62; version 1.5.4 (r33841).&#60;/em&#62;<br />
&#60;/body&#62;&#60;/html&#62;</em></p></blockquote>
<blockquote><p><em>$ curl -k https://username:password@localhost/svn/myproject/<br />
&#60;html&#62;&#60;head&#62;&#60;title&#62;myproject &#8211; Revision 0: /&#60;/title&#62;&#60;/head&#62;<br />
&#60;body&#62;<br />
&#60;h2&#62;myproject &#8211; Revision 0: /&#60;/h2&#62;<br />
&#60;ul&#62;<br />
&#60;/ul&#62;<br />
&#60;hr noshade&#62;&#60;em&#62;Powered by &#60;a href=&#8221;http://subversion.tigris.org/&#8221;&#62;Subversion&#60;/a&#62; version 1.5.4 (r33841).&#60;/em&#62;<br />
&#60;/body&#62;&#60;/html&#62;</em></p></blockquote>
<p>Now we can also download our project using svn</p>
<blockquote><p><em>$ svn co https://localhost/svn/myproject myproject &#8211;username luigi</em></p></blockquote>
<p>&#8220;luigi&#8221; is obviously my username, substitute it with yours.<br />
The first time it will prompt for accepting the SSL certificate, answer to accept it permanently (p). Then it will optionally ask you for the password, type it.<br />
We can also test that modifying the remote repository is working with:</p>
<blockquote><p><em>$ svn mkdir -m &#8220;created the trunk for the project&#8221; https://localhost/svn/myproject/trunk &#8211;username luigi</em></p></blockquote>
<p>It will answer: Committed revision 1.  If so, we&#8217;ve done.</p>
<h3>5. Installing Trac</h3>
<p>To install trac files and required dependencies, type the following command:</p>
<blockquote><p><em>$ sudo apt-get install trac<br />
$ sudo apt-get install libapache2-mod-python</em></p>
<p>Let&#8217;s create the directories for trac web folder:</p></blockquote>
<blockquote><p><em>$ sudo mkdir /var/local/trac<br />
$ sudo chown www-data:www-data /var/local/trac</em></p></blockquote>
<p>edit Apache configuration file for one of your enabled sites (in this example I modify the default http one, but you can choose to put trac on HTTPS modifying default-ssl)</p>
<blockquote><p><em>$ sudo gedit /etc/apache2/sites-enabled/000-default</em></p></blockquote>
<p>and add the following lines at the end of the file, before the &#60;/VirtualHost&#62; tag:</p>
<blockquote><p><em>&#60;Location /projects&#62;<br />
SetHandler mod_python<br />
PythonInterpreter main_interpreter<br />
PythonHandler trac.web.modpython_frontend<br />
PythonOption TracEnvParentDir /var/local/trac<br />
PythonOption TracUriRoot /projects<br />
PythonOption PYTHON_EGG_CACHE /tmp<br />
&#60;/Location&#62;</em></p>
<p><em># use the following for one authorization for all projects<br />
# (names containing &#8220;-&#8221; are not detected):<br />
&#60;LocationMatch &#8220;/projects/[[:alnum:]]+/login&#8221;&#62;<br />
AuthType Basic<br />
AuthName &#8220;trac&#8221;<br />
AuthUserFile /etc/trac/trac.passwd<br />
Require valid-user<br />
&#60;/LocationMatch&#62;</em></p></blockquote>
<p>Create a password file for trac users (if you want you can reuse or link the passwd file used for subversion  repositories)</p>
<blockquote><p><em>$ sudo htpasswd -c /etc/trac/trac.passwd luigi<br />
$ sudo htpasswd  /etc/trac/trac.passwd mario<br />
&#8230; continue this way for all your users.</em></p></blockquote>
<p>Create the trac environment for your project:</p>
<blockquote><p><em>$ sudo -u www-data trac-admin /var/local/trac/myproject initenv</em></p></blockquote>
<p>It will ask you some questions related to your project. Here&#8217;s my answers in blue</p>
<blockquote><p><em>Project Name [My Project]&#62;<span style="color:#0000ff;"> My Project</span><br />
Database connection string [sqlite:db/trac.db]&#62; <span style="color:#0000ff;">[Just press Enter to accept the default]</span><br />
Repository type [svn]&#62;  <span style="color:#0000ff;">[Just press Enter to accept the default]</span><br />
Path to repository [/path/to/repos]&#62; <span style="color:#0000ff;">/var/local/svn/myproject</span></em></p></blockquote>
<p>Now let&#8217;s restart apache:</p>
<blockquote><p><em>$ sudo /etc/init.d/apache2 restart</em></p></blockquote>
<p>Check that trac works properly connecting the browser to <a href="http://localhost/projects">http://localhost/projects</a> or use curl to verify that the url is responding properly as we did before. This url should display a link to &#8220;My Project&#8221;, click on it and you should see the project home page. Clicking on login the browser should ask you to provide username and password as recently defined with htpasswd command.</p>
<p>Last thing to do: add yourself as administrator for Trac. This will enable the Admin menu and allow to do much of the administration operations from the web, that you could also do at the command line with trac-admin tool.<br />
Execute the following command:</p>
<blockquote><p><em>$ sudo -u www-data trac-admin /var/local/trac/myproject permission add luigi TRAC_ADMIN</em></p></blockquote>
<p>This will make the username &#8216;luigi&#8217; administrator for the project.</p>
<p>You can tune additional configuration settings in Trac to enable email notification, change the project logo, etc. Everything you need to know is on Trac <a href="http://trac.edgewall.org/wiki/TracGuide">website</a>. For the configuration check here: <a href="http://trac.edgewall.org/wiki/TracIni">http://trac.edgewall.org/wiki/TracIni</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[[Seri Open Source] Alternatif Paket Web Server di Linux]]></title>
<link>http://egadioniputri.wordpress.com/2009/09/10/seri-open-source-1-alternatif-paket-web-server-di-linux/</link>
<pubDate>Thu, 10 Sep 2009 02:40:35 +0000</pubDate>
<dc:creator>Ega Dioni Putri</dc:creator>
<guid>http://egadioniputri.wordpress.com/2009/09/10/seri-open-source-1-alternatif-paket-web-server-di-linux/</guid>
<description><![CDATA[Ketika menjalani kerja praktek di PT Telekomunikasi Indonesia, Tbk. alias TELKOM, kantor Japati, Ban]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ketika menjalani kerja praktek di PT Telekomunikasi Indonesia, Tbk. alias TELKOM, kantor Japati, Bandung, sebulan yang lalu, saya ditugaskan untuk mengerjakan proyek yang melibatkan bahasa pemrograman PHP dan DBMS Oracle. Walaupun sebelumnya saya sudah bisa &#8216;bermain&#8217; Oracle dengan mulusnya di Ubuntu saya, namun menjalankan <em>script</em> PHP dengan fungsi <code>oci</code> di dalamnya adalah pengalaman baru bagi saya. Beruntunglah beberapa rekan kerja saya di sana ternyata juga Ubuntumania jadi saya banyak tertolong dalam mengadaptasikan aplikasi yang biasa digunakan kantor dengan Ubuntu saya. Salah satunya, saya dikenalkan dengan <strong>LAMPP</strong> yang akhirnya membantu saya menjalankan fungsi <code>oci</code> di script PHP saya tanpa perlu melakukan konfigurasi yang ribet.</p>
<p>LAMPP, singkatan dari X<strong>AMPP</strong> for <strong>L</strong>inux, merupakan alternatif paket web server di Linux yang bisa kita gunakan seperti layaknya XAMPP di Windows. Pengembang web dengan sistem operasi Windows mungkin sudah terbiasa menggunakan XAMPP. LAMPP ini bisa diinstal dengan atau tanpa paket web server bawaan Linux yang sudah ada sebelumnya. Bagi yang belum ngeh dengan apa yang saya maksud, oke deh cerita dulu ya gimana caranya instal web server dan kawan-kawannya di Linux&#8230;</p>
<p><!--more--></p>
<p>Secara default, di Linux kita bisa memiliki paket web server lengkap dengan server basis data dan berbagai interpreter skrip (umumnya bekerja dengan tiga serangkai ini: Apache, PHP, MySQL) yang diinginkan dengan menginstal package dari menu <strong>Administration -&#62; Synaptic Package Manager</strong> atau dapat juga langsung dijalankan dari terminal. Langkah-langkahnya sebagai berikut:</p>
<h4>Dari terminal</h4>
<ol>
<li>Jangan lupa login sebagai <code>root</code> dulu, ketik <code>sudo -s</code></li>
<li>Instal web server, misal Apache, ketik<br />
<blockquote><p><code>apt-get install apache2</code></p></blockquote>
<p>Keterangan:</p>
<p>Angka &#8216;2&#8242; pada <em>command</em> di atas menunjukkan versi Apache. Anda bisa menggantinya dengan versi yang Anda inginkan, namun saya sarankan instal saja yang terbaru karena kompatibilitasnya mungkin berbeda.</li>
<li>Instal server basis data, misal MySQL, ketik<br />
<blockquote><p><code>apt-get install mysql-server</code><br />
<code>apt-get install mysql-client</code>
</p></blockquote>
<p>untuk kompabilitas dengan php misalnya:</p>
<blockquote><p><code>apt-get install mysql-server php5-mysql</code></p></blockquote>
<p>Keterangan:</p>
<p>Anda dapat mengganti perintah <code>mysql-server</code> dengan server basis data lain, misalnya PostgreSQL maka <code>apt-get install postgresql-nomorversi.</code></li>
</ol>
<h4>Dari Synaptic</h4>
<ol>
<li>Login sebagai root</li>
<li>Instal web server
<ul>
<li> Cari package <strong>apache2</strong></li>
<li>Klik pada <em>checkbox</em>-nya, pilih <strong>Mark for Installation</strong>, pilih &#8220;Mark&#8221; pada kotak dialog konfirmasi, kemudian klik menu <strong>Apply</strong></li>
</ul>
</li>
<li>Instal database server
<ul>
<li>Cari package mysql-client, mysql-server, php-mysl dan package-package mysql lain yang mungkin Anda butuhkan, kemudian lakukan cara yang sama seperti poin berikutnya pada nomor 2</li>
</ul>
</li>
</ol>
<p>Dengan ketiga langkah di atas, Anda sudah dapat menggunakan web server lokal di Linux Anda. Cara menjalankannya melalui terminal dengan perintah berikut:</p>
<blockquote><p><code>sudo -s</code> (masuk sebagai <code>root</code>)</p>
<p><code>/etc/init.d/apache2 start</code></p>
<p><code>/etc/init.d/mysql start</code></p></blockquote>
<p>ganti <code>start</code> dengan <code>stop</code> jika Anda ingin menghentikannya.</p>
<p>Jangan lupa untuk membuat folder <code>public_html</code> di <em>home folder</em> Anda sebelumnya. Folder inilah tempat menyimpan semua file yang ingin kita akses dari web server lokal kita. Alamat default di browser Anda adalah <code>http://localhost/~username</code>, misalnya username saya di laptop pake nama &#8220;diopu&#8221;, maka untuk mengakses file di public_html saya cukup mengetik <code>http://localhost/~diopu</code>.</p>
<p>Sekarang kita kembali ke <del datetime="2009-09-10T01:15:28+00:00">laptop</del> LAMPP. Seperti yang saya katakan tadi, LAMPP merupakan alternatif lain paket web server lokal di Linux. Kalo Anda nggak mau ribet dengan Apache-MySQL-PHP bawaan Linux, Anda dapat memiliki LAMPP dan menjalankannya dengan langkah-langkah berikut:</p>
<ol>
<li>Unduh paketnya dari <a href="www.apachefriends.org/en/xampp-linux.html" target="_blank">www.apachefriends.org/en/xampp-linux.html</a></li>
<li>Di mana pun Anda menyimpan file yang telah diunduh, ekstraklah sang paket di folder <code>/opt</code> dengan perintah<br />
<blockquote><p><code>tar xvfz xampp-linux-1.7.1.tar.gz -C /opt</p>
<p></code></p></blockquote>
<p>(jangan lupa <code>sudo -s</code> dulu)</li>
<li>Kini telah terbentuk sebuah folder <code>lampp</code> di <code>/opt</code></li>
<li>Berhubung Linux suka &#8216;resek&#8217; sama <em>permission</em>, ubah <em>permission</em> folder tersebut dengan perintah<br />
<blockquote><p><code>chmod 777 /opt/lampp</code></p></blockquote>
<p>artinya Anda mengaktifkan mode read-write-execute untuk semua user</li>
<li>Ubah juga permission konfigurasi phpmyadminnya <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  pake perintah<br />
<blockquote><p><code>chmod 644 -R /opt/lampp/phpmyadmin/config.inc.php</code></p></blockquote>
</li>
<li>Jalankan dengan perintah<br />
<blockquote><p><code>/opt/lampp/lampp start</code></p></blockquote>
<p>ganti <code>start</code> dengan <code>stop</code> jika Anda ingin menghentikannya.</li>
<li>Sama seperti di XAMPP, letakkan file-file Anda di <code>/opt/lampp/htdocs</code>, folder htdocs ini seperti public_html-nya LAMPP</li>
</ol>
<p>Voila! Selesai sudah. Kalo pake LAMPP ini, Anda cukup mengetikkan <code>http://localhost</code> pada browser, tidak perlu username di belakangnya. Tapi ingat, Anda tidak dapat menjalankan web server bawaan Linux dan LAMPP sekaligus dalam waktu yang bersamaan, salah satu harus dinonaktifkan. Selamat mencoba!</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[git over https failed to push some refs]]></title>
<link>http://thomaswabner.wordpress.com/2009/09/01/git-over-https-failed-to-push-some-refs/</link>
<pubDate>Tue, 01 Sep 2009 15:38:02 +0000</pubDate>
<dc:creator>Thomas Wabner</dc:creator>
<guid>http://thomaswabner.wordpress.com/2009/09/01/git-over-https-failed-to-push-some-refs/</guid>
<description><![CDATA[I have tried to use our main git repository over https but I had gotten error messages like PUT 5451]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have tried to use our main <a href="http://git-scm.com">git</a> repository over https but I had gotten error messages like</p>
<p><code><br />
PUT 54510da55977f5c1e47e5356b996762f4544b90d failed, aborting (22/403)<br />
MKCOL 3b04e830cf4e221491e38443beac0f2f4a2e61c1 failed, aborting (22/403)<br />
PUT 96496dc5f4115e3b9a90757410158f2ba7d12c80 failed, aborting (22/403)<br />
MKCOL af7988694ce7cc8fbfd6b40deffe78d7231cffc8 failed, aborting (22/403)<br />
Updating remote server info<br />
error: failed to push some refs to 'https://myserver.de/myproject.git'<br />
</code></p>
<p>It was hard to discover whats going wrong here. I have set the <a href="http://stackoverflow.com/questions/128035/how-do-i-pull-from-a-git-repository-through-an-http-proxy">GIT_CURL_VERBOSE=1</a> flag to see if there was an communication problem with my server. The communication itself was ok &#8230; but the server returns always a 403 (permission denied).</p>
<p>Next I had a look into my apache logs and I had seen follow error messages:</p>
<p><code><br />
Permission denied: Unable to create a collection.<br />
</code></p>
<p>This looks like a file permission problem. I have setup a new group for my git repository and give apache the rights for read and write. But the problems still occured.</p>
<p>The solution was to set the correct <a href="http://tldp.org/HOWTO/Apache-WebDAV-LDAP-HOWTO/x383.html">Limit</a> directive in the configuration for my git repository:</p>
<pre class="brush: xml;">
Alias /git /usr/var/git
&lt;directory &quot;/usr/var/git&quot;&gt;
  DAV filesystem
  Options +Indexes

  AuthType Basic
  AuthName &quot;git repositories&quot;
  AuthUserFile /etc/apache/git.users.auth

  &lt;limit GET PUT POST DELETE PROPPATCH MKCOL COPY MOVE LOCK UNLOCK&gt;
    Require valid-user
  &lt;/limit&gt;
&lt;/directory&gt;
</pre>
<p>After a apache reload the push and pull commands working nice.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Apache2 + PHTML + Firefox]]></title>
<link>http://penguim.wordpress.com/2009/08/25/apache2-phtml-firefox/</link>
<pubDate>Tue, 25 Aug 2009 19:55:32 +0000</pubDate>
<dc:creator>penguim</dc:creator>
<guid>http://penguim.wordpress.com/2009/08/25/apache2-phtml-firefox/</guid>
<description><![CDATA[Ao tentar iniciar o processo de instalação via web do Egroupware em um cliente me deparei com um pro]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Ao tentar iniciar o processo de instalação via web do <a href="http://www.egroupware.org">Egroupware</a> em um cliente me deparei com um problema chato. </p>
<p>O firefox tentava fazer o download de um arquivo <strong>PHTML</strong> todas as vezes que eu acessava a URL de configuração do Egroupware, esse erro ocorria tanto no apache2 rodando no Debian quanto no Ubuntu.</p>
<p>Depois de algumas pesquisas entendi que o apache2 não estava conseguindo tratar os arquivos com este tipo de extensão. Resolver o problema foi bastante simples:</p>
<p>Adicionei a seguinte linha no final do arquivo<strong> /etc/apache2/apache2.conf</strong>:</p>
<blockquote><p>
AddType application/x-httpd-php .phtml
</p></blockquote>
<p>Depois limpei todo o cache do firefox e tudo voltou a funcionar corretamente.</p>
<p><a href="http://penguim.wordpress.com/files/2007/03/creysson.jpg"><img src="http://penguim.wordpress.com/files/2007/03/creysson.jpg" alt="creysson.jpg" title="creysson.jpg" width="101" height="102" class="alignleft size-full wp-image-171" /></a></p>
</div>]]></content:encoded>
</item>

</channel>
</rss>
