Gentoo Apache 2.2 update and 403 errors

September 22nd, 2007 by Sjan Evardsson

After upgrading my entire system, moving from Apache 2.0.x to 2.2.6 I ran into an interesting problem (actually, a couple.) Some of the configurations have moved, and things that used to be in the Gentoo dist httpd.conf have been broken out into config files in the /etc/apache2/modules.d/ directory. So, copying my old vhosts file in was not a good idea. And doing a merge of the old and new httpd.conf files was also a mistake. Once I figured out that I had the Listen 80 directive in one file and Listen 192.168.1.10:80 in another I understood why it failed to start. So, I fixed all the configs to match the new setup, and tried again. It started up just fine, and seemed okay, until I tried to connect. I kept getting 403 errors.

I went through the standard checks, checking the file permissions, .htaccess settings, and so on, to no avail. A quick Google search pointed me to the fix from Victor Trac. He found the offending bit in the new broken out config in /etc/apache2/modules.d/00_default_settings.conf where it contains:

<Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
</Directory>

The fix is either to change that to Allow from all and define Deny where needed in each virtual host or to override it in every virtual host. Since I tend to set up my hosts with the idea that the server allows everything and it is up to the host to deny where needed I chose the first option, reloaded Apache and everything is sweet again.

Edit:

I found I was having an error with the RewriteRules after switching from Apache 2.0.x to 2.2.x - I found the fix on the Gentoo forums, which required adding an extra RewriteCond line in the .htaccess file.

The old .htaccess: and the new:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress

and the new:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !\.php$
RewriteRule . /blog/index.php [L]
</IfModule>
# END WordPress

Technorati Tags: , ,

Getting caught up

September 20th, 2007 by Sjan Evardsson

While things have been hectic preparing for the big move, some things have fallen by wayside. Like updating the server (ok, I can’t just blame that on moving, it hasn’t been done in a while) and updating the MySpace crossposter from Roderick Russell to version 2.0. That part, at least, was a piece of cake, and the options panel makes setup much easier.

It turns out the server was still running on the Gentoo 2006.0 profile and in order to bring things up to date I needed to get it to the 2007.0 profile. For anyone who hasn’t tried this, here is the easy way: run emerge –sync and then change the symlink /etc/make.profile to point to the newer profile (in this case /usr/portage/profiles/default-linux/x86/2007.0 - after that run emerge -u portage and then revdep-rebuild (in order to use revdep-rebuild you need to have the gentoolkit installed, which can be done via emerge gentoolkit. (It takes about 5 minutes to download and build.)

After running revdep-rebuild it was time to run the dreaded emerge -auv world. Running verbose shows clearly what is getting replaced, updated, added, etc and you get the nice red blocking messages.

In my case, pecl-zip was blocking php-5.2.4, and no amount of forcing was going to help, so for the duration of the upgrade I unmerged pecl-zip. I also had some blocking in that the current version of Postfix was not compatible with the new version, so the choice is to unmerge Postfix and then emerge (too long of a down-time) or by doing a FORCE_UPGRADE=1 emerge –buildpkgonly postfix followed by /etc/init.d/postfix stop and then emerge –usepkgonly postfix followed by a quick etc-update to merge the config file with the new configs and then restart the server with /etc/init.d/postfix start. Total downtime for the mail server: 2 minutes.

I am currently updating the last of the software (mostly admin and gnu tools) and then will build a new kernel. Of course, since there is a newer version of GCC included in the updates, everything that wasn’t updated will get rebuilt with another call to revdep-rebuild before I configure and compile the new kernel.

It’s not like any of this is difficult, especially when most of the ebuilds are so good about giving you help in their error messages (if there are errors) and often tell you in the message how to fix it step-by-step. Now, if I could just find the build that reminds me every week or so to run emerge –sync and check for updates. Hmmm - I might even put that in a weekly or daily cron job:

  1. #!/bin/bash
  2. #update notifier
  3. usr/bin/emerge –sync > /dev/null 2>&1 || true –nospinner && /usr/bin/emerge -puv world

Then it is just a matter of seeing what shows up as needing to be updated, and I can compare that with messages from the Gentoo Linux Security Advisories to determine which can wait and which are needed right now.

Technorati Tags:

Kororaa - Gentoo with (Xgl) Eye Candy

November 2nd, 2006 by Sjan Evardsson

While the debates carry on over what can be done to make Linux more feasible in the desktop market (in other words desirable enough that average users say “I want that!”) the one argument that seems to rise to the top is eye candy. Does it affect how an OS works? No. Does it change the way programs behave? Maybe superficially. Does it change the way users interact with the OS and the programs? You bet!

I had a chance to play with , a Gentoo-based live CD with AIGL/Xgl and a great install-to-disk tool. And while Xgl is not quite ready for prime-time (I encountered a couple crashes where xdm would completely exit and restart) it is getting close. And the eye candy features (adjustable transparency on windows, the rotating cube desktop, the “liquid-ish” movement of the windows) add a certain amount of “ooh factor.” But the biggest thing I found myself using were three very handy tools: [Ctrl+Shift+Alt+ left or right arrow] to rotate the desktop cube with the active window following, the hot-corner to display all the open windows as tiles, and the [Ctrl+Alt+PgDown] to “flatten” the cube, allowing you to see all the sides at once and use the arrow keys to select one of the desktops to switch to. While many will consider this to still be nothing more than eye-candy, I found it so utile that I am (a little too) eagerly awaiting the next Xgl implementation.

So who, besides me, thinks that these are as useful as they are eye candy-ish? Well, Apple, for one. They already have the hot-corner to display all the open windows, the ability to show all the open windows of one application, and (with Parallels at least - and rumor has it in the next OSX version) the cube concept of the multiple desktops.

New Server, Xmail pains

October 21st, 2006 by Sjan Evardsson

Replacing the old PIII 733MHz server with a slightly less old PIII 1GHz server was mostly very straightforward. That in and of itself doesn’t seem like much, until you consider that the old server was running a stripped out Vector with a chrooted lampp, and the replacement is running Gentoo with the traditional-one-tool-at-a-time type installation.

It was mostly simple, since every single tool I use has a Gentoo ebuild. Everything seemed to be going just fine, until I discovered the hard way that the Gentoo ebuild for XMail is b0rked. :-/

Well, since it is way past my bedtime I am going to put it down for the night and try to tackle it tomorrow. But, until I get it working all mail to evardsson.com and talkingfox.com will bounce. Sorry.