<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Doug Jaworski &#187; Apache</title>
	<atom:link href="http://www.dougjaworski.com/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dougjaworski.com/blog</link>
	<description></description>
	<lastBuildDate>Sun, 25 Jul 2010 17:03:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Installing Ruby on Rails &#8211; Ubuntu Linux</title>
		<link>http://www.dougjaworski.com/blog/installing-ruby-on-rails-ubuntu-linux/</link>
		<comments>http://www.dougjaworski.com/blog/installing-ruby-on-rails-ubuntu-linux/#comments</comments>
		<pubDate>Mon, 04 Jan 2010 03:03:28 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[HowTo]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>

		<guid isPermaLink="false">http://www.dougjaworski.com/blog/?p=177</guid>
		<description><![CDATA[Over the past few weeks I have been teaching myself ever so slowly Ruby on Rails. While my background is system administration, I have always had an eye for programming logic and a respect for programmers. The first place one needs to start when learning Ruby on Rails is getting up and running Ruby on [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few weeks I have been teaching myself ever so slowly Ruby on Rails. While my background is system administration, I have always had an eye for programming logic and a respect for programmers. The first place one needs to start when learning Ruby on Rails is getting up and running Ruby on Rails on the Server or Workstation. </p>
<p>I already have a dedicated Ubuntu Servers so I will leverage what I already have implemented and hook in Ruby on Rails. For my server environment I already have Apache 2, MySQL Server and a few other tools so I will start with that as a baseline. If you don&#8217;t have any of this installed already I have created a primer below.</p>
<p><strong>Install Apache Server<br />
</strong></p>
<pre>sudo apt-get install apache2</pre>
<p>After the install, Apache will autostart. As a result you might find an error</p>
<pre>* Starting web server apache2
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
   ...done.</pre>
<p>While this is annoying, it does not impact Apache&#8217;s ability to operate but the fix is simple and resolved by creating a file called fqdn (fully qualified domain name) in /etc/apache2/conf.d/. Mine looks like this:</p>
<pre>ServerName localhost</pre>
<p>Restarting Apache will now result in a clean startup.</p>
<pre>sudo /etc/init.d/apache2 restart</pre>
<p><strong>Install Mysql Server<br />
</strong></p>
<p>While Ruby runs great with sqlite, I have on my server MySQL as it performs all the needs I have in a shared database environment. Installing is simple and is accomplished with just a few simple commands.</p>
<pre>sudo apt-get install mysql-server
sudo apt-get install libmysqlclient16-dev</pre>
<p>During the install, MySQL will prompt you to create a root password for the admin user. </p>
<p>To test the installation, log in to MySQL via command line to confirm.</p>
<pre>doug@audi:~$ mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 34
Server version: 5.0.75-0ubuntu10.2 (Ubuntu)
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql></pre>
<p>And to view the databases</p>
<pre>mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
+--------------------+
2 rows in set (0.00 sec)
mysql></pre>
<p><strong>Install Ruby from Source<br />
</strong></p>
<p>While this solution might promote some argument, I believe by far the best way to work with some applications, including Ruby on Rails is to install from source. This method will give you the most control as well as provide stability when performing system upgrades or during the patching process.</p>
<p>Make a directory for all your source code. This will come in handy when you need to re-compile and add in additional functionality for future efforts.</p>
<p>You may already have a /usr/local/src directory but if you don&#8217;t, simply create one for yourself.</p>
<pre>sudo mkdir /usr/local/src</pre>
<p>We will place all source code for Ruby and RubyGems in this directory.</p>
<p>Download Ruby</p>
<pre>cd /usr/local/src</pre>
<pre>sudo wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7-p174.tar.gz</pre>
<p>You need to use sudo with wget in this case because as a normal user, you wont have the necessary permissions to save to this directory.</p>
<p>Uncompress ruby-1.8.7-p174.tar.gz</p>
<pre>sudo tar -xzvf ruby-1.8.7-p174.tar.gz
cd ruby-1.8.7-p174
sudo ./configure
sudo make
sudo make install</pre>
<p>Ruby is now installed in /usr/local/bin/ruby</p>
<p>While Ruby is installed, there a still 2 pieces that are needed before we install RubyGems.</p>
<p>Install zlib for Ruby</p>
<pre>cd /usr/local/src/ruby-1.8.7-p174/ext/zlib
sudo ruby extconf.rb --with-zlib-include=/usr/include --with-zlib-lib=/usr/lib
sudo make
sudo make install
</pre>
<p>Install openssl for Ruby</p>
<pre>cd ../openssl/
sudo ruby extconf.rb
sudo make
sudo make install</pre>
<p><strong>Install RubyGems</strong></p>
<pre>cd /usr/local/src/
sudo wget http://rubyforge.org/frs/download.php/60718/rubygems-1.3.5.tgz
sudo tar -xzvf rubygems-1.3.5.tgz
cd rubygems-1.3.5
sudo ruby setup.rb config
sudo ruby setup.rb setup
sudo ruby setup.rb install</pre>
<p><strong>Install RAILS</strong></p>
<pre>sudo gem install rails</pre>
<p>You will need to enable RAILS to talk to our database and this is done by installing the mysql gem.</p>
<pre>sudo gem install mysql</pre>
<p>Optionally, you can install Mongrel instead of using WebBrick.</p>
<pre>sudo gem instal mongrel</pre>
<p><strong>Install Passenger</strong></p>
<p>Passenger basically allows you to proxy RAILS applications via apache to the Ruby server &#8211; WebBrick or Mongrel. The installation is rather easy and is installed via a Ruby gem. Once installed you will need to modify your Apache configurations to point to the appropriate RAILS application.</p>
<pre>sudo gem install Passenger
sudo passenger-install-apache2-module</pre>
<p>After running passenger-install-apache2-module, it said I was missing some dependencies. In my case I needed to install the following via apt-get.</p>
<pre>sudo apt-get install build-essential apache2-prefork-dev libapr1-dev libaprutil1-dev</pre>
<p>After installing the dependancies, re-run passenger-install-apache2-module.</p>
<pre>sudo passenger-install-apache2-module</pre>
<p>The passenger configuration requires you to modify your Apache configuration file. In my case I create a file in /etc/apache2/conf.d called passenger.</p>
<pre>sudo vi /etc/apache2/conf.d/passenger</pre>
<pre>LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.8/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-2.2.8
PassengerRuby /usr/local/bin/ruby</pre>
<p>Then you need to create a virtual host to point to your new application. In my case it is setup in this fashion but there are many other ways of accomplishing the same thing.</p>
<pre>sudo vi /etc/apache2/site-available/ruby.dougjaworski.com</pre>
<p>What my virtual host file looks like.</p>
<pre>< VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName ruby.dougjaworski.com
        DocumentRoot /home/doug/rails_apps/test/public
        < Directory /home/doug/rails_apps/test/public>
                Options MultiViews
                AllowOverride All
        < /Directory>
< /VirtualHost></pre>
<p>It is important that you point DocumentRoot to the location of your applications public folder as this is what is exposed to Apache.</p>
<p>It is also important that you have a DNS record or at the very least an entry in hosts host pointing to your Apache virtual host as this is named based resolution.</p>
<p>Now you must enable the virtual host.</p>
<pre>sudo a2ensite ruby.dougjaworski.com
[sudo] password for doug:
Enabling site ruby.dougjaworski.com.
Run '/etc/init.d/apache2 reload' to activate new configuration!</pre>
<p>Reload the Apache configuration so your changes take effect.</p>
<pre>sudo /etc/init.d/apache2 reload</pre>
<p>Point your web browser to your new RAILS site!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougjaworski.com/blog/installing-ruby-on-rails-ubuntu-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 2.7 Permalinks Not Working (Solved)</title>
		<link>http://www.dougjaworski.com/blog/wordpress-27-permalinks-not-working-solved/</link>
		<comments>http://www.dougjaworski.com/blog/wordpress-27-permalinks-not-working-solved/#comments</comments>
		<pubDate>Sat, 03 Jan 2009 22:14:46 +0000</pubDate>
		<dc:creator>Doug</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Worpress]]></category>

		<guid isPermaLink="false">http://www.dougjaworski.com/blog/?p=22</guid>
		<description><![CDATA[I recently moved to a new Debian Server with Apache 2.x and installed WordPress 2.7.  When I went to change my permalinks, it was not able to configure the permalink feature. I create the appropriate .htaccess file in the root of the WordPress directory but yet it still failed. What I failed to check the .htaccess was [...]]]></description>
			<content:encoded><![CDATA[<p>I recently moved to a new Debian Server with Apache 2.x and installed WordPress 2.7.  When I went to change my permalinks, it was not able to configure the permalink feature. I create the appropriate .htaccess file in the root of the WordPress directory but yet it still failed. What I failed to check the .htaccess was enabled. Verify that you have .htaccess enabled in apache (Mod Rewrite) and ensure that your server allows you to override the master Apache configuration directives.</p>
<p>To solve this issue, I simply editied at my Virtual Host configuration file and changed it from<br />
<code><br />
&lt;VirtualHost *&gt;<br />
        DocumentRoot /var/www/SiteName/<br />
        &lt;Directory /&gt;<br />
                Options FollowSymLinks<br />
                AllowOverride None<br />
        &lt;/Directory&gt;<br />
        &lt;Directory /var/www/SiteName/&gt;<br />
                Options Indexes FollowSymLinks MultiViews<br />
                AllowOverride <strong>None<br />
</strong>                Order allow,deny<br />
                allow from all<br />
        &lt;/Directory&gt;<br />
</code><br />
To<br />
<code><br />
&lt;VirtualHost *&gt;<br />
        DocumentRoot /var/www/SiteName/<br />
        &lt;Directory /&gt;<br />
                Options FollowSymLinks<br />
                AllowOverride None<br />
        &lt;/Directory&gt;<br />
        &lt;Directory /var/www/SiteName/&gt;<br />
                Options Indexes FollowSymLinks MultiViews<br />
                AllowOverride <strong>FileInfo</strong><br />
                Order allow,deny<br />
                allow from all<br />
        &lt;/Directory&gt;<br />
</code><br />
Simply change None to FileInfo or All. I chose FileInfo as it is a bit more restrictive. I hope this helps you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dougjaworski.com/blog/wordpress-27-permalinks-not-working-solved/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
