Browsed by
Category: Sysadmin

SSL Private Key file recovery

SSL Private Key file recovery

I did something very bad today. I’m ashamed but I’ll tell you because it was interesting. I had a SSL certificate to renew. I just got the new my.server.crt, and I just had to replace the old one with this new one. Nothing complicated, but the files on the server were named badly, so I started putting everything back in order : my.server.csr for the Certificate Signing Request my.server.crt for the certificate itself my.server.key for the private key During this…

Read More Read More

URL redirections

URL redirections

URL redirections were obvious for me. That was before my husband asked me about the differences between redirecting within htaccess, php, or any other way. Sure I knew how to do it, but I never wondered about the differences between all the ways. So while understanding those will be my goal today, my favorite SEO expert (aka my husband) will explain you how to use the redirections in a proper SEO way (in french for now, soon translated).

Sticky bit

Sticky bit

I recently had an interview in which I got asked about the sticky bit. Honnestly, I can’t remember what this is. Of course I know it has something to do with access rights on a Linux filesystem, and I remember having checked Wikipedia or man at least 10 times about it but it just doesn’t stick in my head. So I’ll try to dig a little in its behaviour to make it stay up there ! How to set it…

Read More Read More

Apache2 Rewritemap

Apache2 Rewritemap

I love apache mod_rewrite. I often fight with it, but if you really want it you can do whatever you want. This time I wanted to find a way to call a file named after the called subdomain. I have a website called www.yellow-sub.net, and there is some subdomains like the-beatles.yellow-sub.net, john-lennon.yellow-sub.net and so on for each part of the website (That’s a SEO consideration in the beginning). I have only one virtual host for that website because I find…

Read More Read More

How to resolv .42 domains

How to resolv .42 domains

I’m sure you heard of the new unofficial domain registry 42registry, who let you register domains like something.42. If you didn’t, go on there website and read, cause I found this very interesting, funny, and it made me want to try 🙂 So, after registering sysadmandine.42 domain name, I tried to surf on it. But I didn’t want to spend time to configure a secured but open bind on one of my servers, so I opted for the easy way…

Read More Read More

Add disk space to a .img disk image (for use with xen for example)

Add disk space to a .img disk image (for use with xen for example)

Sometimes, you need more space on a virtual machine disk than you thought in the beginning. Hopefully, if your domU disk is in a .img file, you can do it quite easily (you can do it easily with lvm partition too, even if it’s a different method). Here’s how to do it, as root of course : – Check your partitions in your domU : df -h Filesystem            Size  Used Avail Use% Mounted on /dev/xvda2…

Read More Read More

Apache2 mod_rewrite and %{REQUEST_FILENAME}

Apache2 mod_rewrite and %{REQUEST_FILENAME}

I’m trying to develop a new website to increase my php object oriented skills. For this new website, I want every request for any url that doesn’t match a actual file on the disk to be redirected to index.php (to handle parameters in fact). Easy with apache2 rewrite rules :          RewriteCond %{REQUEST_FILENAME} !-f          RewriteCond %{REQUEST_FILENAME} !-d          RewriteCond %{REQUEST_FILENAME} !-l                  …

Read More Read More

My top 20 linux favourite commands

My top 20 linux favourite commands

Here’s my linux favourite commands, by type : Scripting 1. egrep : aaah… if I had to keep only one, this would be the one I’d choose… can’t spend 10 minutes without using it. 2. sed : because I always need to replace something by something else 10 times on each line in huge files 3. xargs : helps me avoid the for loop, shorter to write, easier to remember and understand when you find it in history 4. awk…

Read More Read More

htpasswd encryption

htpasswd encryption

I was wondering how crypt does the encryption of passwords. Once I needed to compare two .htpasswd files, I was quite sure that both had the same password for the same user, but the encrypted strings didn’t match. I tried to regenerate the encrypted string several times, and here’s what I got : $ htpasswd -nb someuser somepwd someuser:qQD5GYrJQSIwk $ htpasswd -nb someuser somepwd someuser:zD9H4NFRuDjk6 $ htpasswd -nb someuser somepwd someuser:IK572FjeWHPYw $ htpasswd -nb someuser somepwd someuser:O2UkOjX3ynZCU $ htpasswd -nb…

Read More Read More

Pound

Pound

Pound is a wonderful tool. It does just what you want, and does it good. Well, most of the time actually. Let me present it. Pound is made by a Swiss company named Apsis GmbH (http://www.apsis.ch/), and its purpose is to achieve 3 goals : – reverse proxy – load balancing – HTTPS front-end You don’t need to use all 3 features, but you might need it anyway. Don’t assume it can do other things : No caching, no webserver,…

Read More Read More

ae7d7e1da96d0051982b0a3a0ea56121WWWWWWWWWWWWWWWWWWWWWW