Showing posts with label Apache. Show all posts
Showing posts with label Apache. Show all posts

Friday, February 11, 2011

Redmine is awesome

Been trying out a new issue tracker at work, it's called Redmine. In ubuntu just need to do an:
sudo apt-get install redmine redmine-mysql
Then once that is installed add the following line to /etc/apache2/mods-available/passenger.conf
PassengerDefaultUser www-data
Then add the following lines in /etc/apache2/sites-available/default
<Directory /var/www/redmine>
RailsBaseURI /redmine
PassengerResolveSymlinksInDocumentRoot on
</Directory>
Then enable the passenger module for apache by running:
sudo a2enmod passenger
After that add the redmine softlink in the /var/www directory:
cd /var/www
sudo ln -s /usr/share/redmine/public redmine
Then you should be able to access it from http://localhost/redmine. Default username and password is admin:admin.

Saturday, April 19, 2008

VirtualHost in apache

Finally understand it after reading:
http://www.onlamp.com/pub/a/apache/2003/07/24/vhosts.html?page=2
I was having lotsa trouble understanding why wasn't my rules applying to the vhost I was setting up. But after reading that I know you weren't suppose to create multiple NameVirtualHost entry. Just one. The ServerName inside the VirtualHost block will determine whether that block applies to the query or not.

Saturday, February 23, 2008

Running Plone behind an apache server

Alhamdullillah.. After a whole night of googling and hacking configurations I was finally able to configure Plone to run behind an apache server. I began my quest by googling and finding this page: http://plone.org/documentation/how-to/apache-ssl . I don't need the ssl mentioned there but I did want to run Plone behind apache. But following the instructions didn't get me any result. So I tried to find out what on earth does the RewriteRule is actually about. After much googling again I found this: http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html which also led me to an interesting albeit not really what I'm looking for now at http://httpd.apache.org/docs/1.3/misc/rewriteguide.html. Sooooo... the [P] actually stands for proxy.

Ok.. so now I'm getting somewhere. After much trial and error I finally figured out that I need to run:
sudo a2enmod proxy
sudo a2enmod proxy_http

To enable the proxy function in my apache server. Once that is done, it seems the rules given at the first website is not really correct. So in the end my .htaccess contains the following:
<IfModule mod_proxy.c>
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^(.*)$ http://localhost:8080/$1 [P]
</IfModule>
</IfModule>

But even though that is all fine and dandy, it didn't allow me to surf to more than the front page. All the subsequent links in the page was broken. And I experimented some more until finally I've got it at:

RewriteRule ^(.*) http://localhost:8080/VirtualHostBase/http/abdullahsolutions.com:80/VirtualHostRoot/_vh_plone/$1 [P]


Read the first article and it will mention about enabling Virtual Host Monster in the zope management page. But it did not mention about if you we're actually serving from a directory under your web root. Well, good thing the about page on the zope management page explained it all. So for the example above, my server was serving plone from the directory plone. The _vh_ tells the virtual host monster to append plone/ to every link it generates. Cool stuff..

So then I finally got it working. Alhamdullillah... Took a whole night. But seems to be very worth it.

Update (16 March 2008): Finally I've even got the layout working. After referring to http://matthewwhitworth.com/2008/02/06/escape-from-mod_rewrite/ and the Velo site it point to and also http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#mapfunc which explains what RewriteMap actually does. The RewriteMap part has to be part of the http.conf or if you are using Ubuntu in the sites configuration file. Then escape the request just like it says in the matthewwhitworth site and it all should work. Finally.

Is Blogging No Longer a Thing?

As I embark on my new journey to learn the Rust programming language, I find myself pondering—where have all the blogs gone? In search of pr...