<?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>HowToBSD &#187; apache</title>
	<atom:link href="http://howtobsd.com/tag/apache/feed" rel="self" type="application/rss+xml" />
	<link>http://howtobsd.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Tue, 11 Feb 2014 11:21:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Installation Redmine on FreeBSD</title>
		<link>http://howtobsd.com/software/redmine-on-freebsd.html</link>
		<comments>http://howtobsd.com/software/redmine-on-freebsd.html#comments</comments>
		<pubDate>Sat, 22 Oct 2011 15:32:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[problems & solutions]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[www]]></category>

		<guid isPermaLink="false">http://howtobsd.com/?p=500</guid>
		<description><![CDATA[Perhaps you know redmine ported in FreeBSD and first of all I tried to install it: #cd /usr/ports/www/redmine ===> redmine-1.2.1_1 is marked as broken: Does not work with RubyGems 1.8. *** Error code 1 Stop in /usr/ports/www/redmine. Sure. You wouldn&#8217;t read this post if process had been done successfully Maintainer of this port marked this [...]]]></description>
				<content:encoded><![CDATA[<p>Perhaps you know redmine ported in FreeBSD and first of all I tried to install it:</p>
<p><code>#cd /usr/ports/www/redmine<br />
===>  redmine-1.2.1_1 is marked as broken: Does not work with RubyGems 1.8.<br />
*** Error code 1</p>
<p>Stop in /usr/ports/www/redmine.</code></p>
<p>Sure. You wouldn&#8217;t read this post if process had been done successfully <img src='http://howtobsd.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Maintainer of this port marked this port as broken because of bug in Gem 1.8.</p>
<p>As result we have to install it manually. Hopefully we have official <a href="http://www.redmine.org/projects/redmine/wiki/RedmineInstall">installation guide</a>.</p>
<p>I came across with some problems during installation. So, this post will be a guide adapted for FreeBSD with some errors and solutions.<br />
Hope it will be useful. It seems as long process, but really easy. Let&#8217;s start.</p>
<p><strong>1) Get Redmine (I used svn for it):</strong></p>
<p><code>#svn co http://redmine.rubyforge.org/svn/branches/1.2-stable redmine-1.2</code></p>
<p><strong>2) Create database:</strong><br />
<code>mysql -uuser -ppasword<br />
mysql> create database redmine character set utf8;<br />
mysql> create user 'redmine'@'localhost' identified by 'passforuser';<br />
mysql> grant all privileges on redmine.* to 'redmine'@'localhost';<br />
mysql>exit;</code><br />
<strong><br />
3) Database configuration (copy from config/database.yml.example). config/database.yml:</strong><br />
<code>production:<br />
  adapter: mysql<br />
  database: redmine<br />
  host: localhost<br />
  username: redmine<br />
  password: passforuser</code></p>
<p><strong>4)Generate a session store secret.</strong><br />
<code>#rake generate_session_store<br />
Missing the i18n 0.4.2 gem. Please `gem install -v=0.4.2 i18n`</code></p>
<p>At this place started problems. Don&#8217;t worry. Just do thing redmine suggests. </p>
<p><code>#gem install -v=0.4.2 i18n<br />
Fetching: i18n-0.4.2.gem (100%)<br />
Successfully installed i18n-0.4.2<br />
1 gem installed<br />
Installing ri documentation for i18n-0.4.2...<br />
Installing RDoc documentation for i18n-0.4.2...</code></p>
<p>trying again:</p>
<p><code>#rake generate_session_store<br />
Missing the Rails 2.3.11 gem. Please `gem install -v=2.3.11 rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.</code></p>
<p>I tried update  RAILS_GEM_VERSION (on 3.0.5) but Redmine doesn&#8217;t work with 3.0.5 yet, so:</p>
<p><code># gem install -v=2.3.11 rails</code></p>
<p>then again:<br />
<code># rake generate_session_store<br />
rake/rdoctask is deprecated.  Use rdoc/task instead (in RDoc 2.4.2+)<br />
WARNING: 'task :t, arg, :needs => [deps]' is deprecated.  Please use 'task :t, [args] => [deps]' instead.<br />
    at /vol1/www/www.slim/httdocs/redmine/redmine-1.2/lib/tasks/email.rake:170</code></p>
<p>Googled the problem and found out it connected with rake version (need to downgrade):</p>
<p><code># gem install -v=0.8.7 rake<br />
Fetching: rake-0.8.7.gem (100%)<br />
Successfully installed rake-0.8.7<br />
1 gem installed<br />
Installing ri documentation for rake-0.8.7...<br />
Installing RDoc documentation for rake-0.8.7...</code></p>
<p><code># gem uninstall -v=0.9.2 rake<br />
Successfully uninstalled rake-0.9.2</code></p>
<p>finally it done:<br />
<code># rake generate_session_store<br />
(in /vol1/www/www.slim/httdocs/redmine/redmine-1.2)</code></p>
<p><strong>5) Database migration:</strong><br />
<code># rake db:migrate RAILS_ENV=production<br />
(in /vol1/www/www.slim/httdocs/redmine/redmine-1.2)<br />
rake aborted!<br />
syntax error on line 8, col 2: `  encoding: utf8'</p>
<p>(See full trace by running task with --trace)</code></p>
<p>Problem was &#8211; I missed space in config/database.yml before the password.</p>
<p><code># rake db:migrate RAILS_ENV=production<br />
(in /vol1/www/www.slim/httdocs/redmine/redmine-1.2)<br />
!!! The bundled mysql.rb driver has been removed from Rails 2.2. Please install the mysql gem and try again: gem install mysql.<br />
rake aborted!<br />
no such file to load -- mysql</code></p>
<p>installing gem mysql:<br />
<code>howtobsd# gem install mysql</code></p>
<p>and then:<br />
<code>howtobsd# rake db:migrate RAILS_ENV=production</code></p>
<p>db migration done!</p>
<p><strong>6) Load default data (recommended):</strong><br />
<code># rake redmine:load_default_data  RAILS_ENV=production<br />
(in /vol1/www/www.slim/httdocs/redmine/redmine-1.2)</p>
<p>Select language: bg, bs, ca, cs, da, de, el, en, en-GB, es, eu, fa, fi, fr, gl, he, hr, hu, id, it, ja, ko, lt, lv, mk, mn, nl, no, pl, pt, pt-BR, ro, ru, sk, sl, sr, sr-YU, sv, th, tr, uk, vi, zh, zh-TW [en]</code></p>
<p>Choose language and moving ahead. </p>
<p><strong>7)According to manual set permissions (create required folders if it doesn&#8217;t exist):</strong></p>
<p><code>chown -R username:username files log tmp public/plugin_assets<br />
chmod -R 755 files log tmp public/plugin_assets</code></p>
<p><strong>8) Test installation:</strong><br />
<code>#ruby script/server webrick -e production<br />
=> Booting WEBrick<br />
=> Rails 2.3.11 application starting on http://0.0.0.0:3000</p>
<p>now you can enter in your browser http://localhost:3000</code></p>
<p>    *  login: admin<br />
    * password: admin</p>
<p>Great! It is works!</p>
<p><strong>9) We only need to configure Apache for redmine.</strong><br />
It is described in my article <a href="software/installing-ruby-on-rails-on-freebsd.html"> &#8220;Installing Ruby on Rails on FreeBSD&#8221;</a> with differences in httpd.conf for new versions.<br />
Now for me it:<br />
<code>LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.5/ext/apache2/mod_passenger.so<br />
PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.5<br />
PassengerRuby /usr/local/bin/ruby18</code></p>
<p><strong>10)My example of virtual host for redmine:</strong><br />
<code>&lt;VirtualHost *:80&gt;<br />
        ServerName my-projects.com<br />
        DocumentRoot /vol1/www/www.slim/httdocs/redmine/redmine-1.2/public/<br />
        RailsEnv production<br />
        ErrorLog /vol1/www/www.slim/httdocs/redmine/redmine-1.2/log/httpd.log<br />
&lt;/VirtualHost&gt;</code></p>
<p>That&#8217;s all!</p>
]]></content:encoded>
			<wfw:commentRss>http://howtobsd.com/software/redmine-on-freebsd.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Perl: Premature end of script headers</title>
		<link>http://howtobsd.com/development/perl-premature-end-of-script-headers.html</link>
		<comments>http://howtobsd.com/development/perl-premature-end-of-script-headers.html#comments</comments>
		<pubDate>Wed, 29 Jun 2011 12:52:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[problems & solutions]]></category>

		<guid isPermaLink="false">http://howtobsd.com/?p=391</guid>
		<description><![CDATA[Internal Server Error 500 This error appeared when I tried run IPN script for paypal. httpd-error logs: Perl: Premature end of script headers A long time I have tried to fix it by sending headers like: print "Content-type: text/plain\n\n"; но безуспешно. The problem was just in DOS newline format. Just need change format from DOS/WIN [...]]]></description>
				<content:encoded><![CDATA[<p>Internal Server Error 500<br />
This error appeared when I tried run IPN script for paypal.<br />
httpd-error logs:</p>
<p><code>Perl: Premature end of script headers </code></p>
<p>A long time I have tried to fix it by sending headers like:</p>
<p><code>print "Content-type: text/plain\n\n";</code> но безуспешно.</p>
<p>The problem was just  in DOS newline format.  Just need change format from DOS/WIN (CR/LF) to Unix (LF). </p>
<p>I hope it will help somebody else.</p>
]]></content:encoded>
			<wfw:commentRss>http://howtobsd.com/development/perl-premature-end-of-script-headers.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The problem with mod_ssl: Undefined symbol &#8220;SSL_get_servername&#8221;</title>
		<link>http://howtobsd.com/solutions/the-problem-with-mod_ssl-undefined-symbol-ssl_get_servername.html</link>
		<comments>http://howtobsd.com/solutions/the-problem-with-mod_ssl-undefined-symbol-ssl_get_servername.html#comments</comments>
		<pubDate>Tue, 01 Jun 2010 07:18:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Solutions]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[mod_ssl]]></category>
		<category><![CDATA[problems & solutions]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://howtobsd.com/?p=121</guid>
		<description><![CDATA[If you have a some problem: Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration check the string in httpd.conf LoadModule ssl_module libexec/apache22/mod_ssl.so &#8211; it&#8217;s shouldn&#8217;t be comment After update openssl and apache it turns out that apache can&#8217;t start: Syntax error on line 68 of /usr/local/etc/apache22/httpd.conf: Cannot [...]]]></description>
				<content:encoded><![CDATA[<p>If you have a some problem:</p>
<p><code>Invalid command 'SSLEngine', perhaps misspelled or defined by a module not included in the server configuration</code></p>
<p>check the string in httpd.conf LoadModule ssl_module libexec/apache22/mod_ssl.so &#8211; it&#8217;s shouldn&#8217;t be comment</p>
<p>After update openssl and apache it turns out that apache can&#8217;t start:</p>
<p><code>Syntax error on line 68 of /usr/local/etc/apache22/httpd.conf: Cannot load /usr/local/libexec/apache22/mod_ssl.so into server: /usr/local/libexec/apache22/mod_ssl.so: Undefined symbol "SSL_get_servername"</code></p>
<p>The solution is rebuilt apache with WITH_OPENSSL_PORT:</p>
<p><code>echo 'WITH_OPENSSL_PORT=yes' >> /etc/make.conf</code></p>
]]></content:encoded>
			<wfw:commentRss>http://howtobsd.com/solutions/the-problem-with-mod_ssl-undefined-symbol-ssl_get_servername.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to restart apache</title>
		<link>http://howtobsd.com/tips/how-to-restart-apache.html</link>
		<comments>http://howtobsd.com/tips/how-to-restart-apache.html#comments</comments>
		<pubDate>Sat, 20 Feb 2010 21:51:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Tips]]></category>
		<category><![CDATA[apache]]></category>

		<guid isPermaLink="false">http://howtobsd.com/?p=70</guid>
		<description><![CDATA[restart apache: apachectl restart restart without aborting open connections: apachectl graceful]]></description>
				<content:encoded><![CDATA[<p>restart apache:</p>
<p><code>apachectl restart</code></p>
<p>restart without aborting open connections:</p>
<p><code>apachectl graceful</code></p>
]]></content:encoded>
			<wfw:commentRss>http://howtobsd.com/tips/how-to-restart-apache.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
