25 Apr 2010
In order to install my home file server without any screen, I searched some HOWTOs and found these links :
The second link helped me create the Debian Installer PXE file and gave me a preseed file in order to start an SSH server.
Of course, I have customized it a bit, but nothing really hard with that step.
This works like a charm so I decided to create a Virtual Machine on my laptop with a preconfigurated PXE and preseed environment.
Happy remote installing ;)
20 Apr 2010
Today, when configuring a new SVN repository, I faced a new problem with Apache : how to enable basic user authentication from everywhere expect from this special host ??
I wished to be able to authenticate my users but didn’t want to store any credentials on my production server which do “svn export” from the svn repo.
After some googling, I found that the “Satisfy” directive is the one I must use and do that :
Require valid-user
Order allow,deny
Allow from 10.42.42.1
Satisfy any
That tells Apache to require a valid user OR to accept connection from 10.42.42.1.
Of course, I can put any “Allow” directive : network, ip range, domain name, … and everything that match that directive will not be required to authenticate.
10 Apr 2010
I’m now using homebrew for a while, and it may be my perfect package solution on Mac OS X :)
It’s a perfect replacement for MacPorts :
- builds softwares from their sources
- installs each version of each software into a dedicated directory : we can have multiple version of the same software installed at the same time
- removing is just a “rm” command
- upgrading is easy
- no need to be “root” or to use “sudo”
The last line is the more important for me. With homebrew, I’m sure my system will not be corrupted or destroyed when I’m trying a new software or upgrading an other one.
08 Nov 2009
In order to simplify my apache’s administration task, I’m using the apache’s mod_vhost_alias in order to create a large number of vhost and creating them without changing the apache’s configuration.
I’m using this setup with a wildcard DNS zone and this allows me to simply create as many subdomains and vhosts as I want to only by creating the corresponding DocumentRoot’s directory.
But this morning, when setting up my girlfriend’s website, I choose to find a solution about my setup’s big problem : what’s happen if someone tries to access a non existant subdomain ?
Up to now, it ended to a 404 error : Not Found, because the wildcard DNS answers my IP and my vhost_alias setup tries to use a directory like /var/www/crivisier.fr/boggus/htdocs as the DocumentRoot for the boggus subdomain.
I’ve done my job with the rewrite module :
VirtualDocumentRoot /srv/sites/lethiec.fr/%-3+/htdocs/
RewriteCond %{HTTP_HOST} ^(.*)\.lethiec.fr$
RewriteCond /srv/sites/lethiec.fr/%1/htdocs/ !-d
RewriteRule ^/(.*) http://nathalie.lethiec.fr/$1 [L,R=301]
This checks if the DocumentRoot directory for that particular subdomain exists and if not, redirect the
browser to a default subdomain.