Saturday, May 15, 2010

Installing SSL certificate on Apache Fedora 8 AWS AMI

First, run
yum install mod_ssl

It actually do most of the work and even more than it is expected by creating ...httpd/conf.d/ssl.conf
Assuming that your Apache httpd.conf configured to include all files from httpd/conf.d, you will get the content of this file automatically.
Modify VirtualHost :443 inculded there, or remove it completly and define your own VirtualHost for port 443.
Note, that you can not keep the default configuration AND define your own - the default from ssl.conf will always overwrite the next one.

 For your HTTPS VirtualHost you will need 4 files:
1. Your DECRYPTED private key file
2. Your certificate, issued by a Certificates Authority
3. Certificate Authority intermidiate server certificate
4. Certificate authority certificate

Your final VirtualHost definition might look like this:

  DocumentRoot /var/www/www.domain.com
  ServerName www.domain.com
      
  SSLEngine on
  SSLProtocol all -SSLv2
  SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM

  SSLCertificateFile /path/ssl/my-certificate.pem
  SSLCertificateKeyFile /path/ssl/decrypted_private_key.pem
  SSLCertificateChainFile /path/ssl/sub.class2.server.ca.pem
  SSLCACertificateFile /path/ssl/ca.pem
  SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
  CustomLog /etc/httpd/logs/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"



Once configured, restart Apache:
service httpd restart

If your certificates are OK, you should get a valid response going to your web over SSL:
curl https://localhost

Sunday, April 18, 2010

Log any MYSQL query

It's just about adding one line into my.cnf, like this post suggests.
Note, that you have to add it under [mysqld] secton (and not under 'mysql').

[mysqld]
log=/tmp/mysql.log

With XAMPP, your my.cnf is called just 'my' and is located in [xampp-installation-folder]/mysql/bin
On Unix/Linux take care of log file access permissions by mysqld daemon.

Saturday, February 20, 2010

Export and Import Putty Session Data

The post above provides teh info how you can do it, however the best way seems to be a short command found in comments to the original post.
On source computer run:
regedit /e "%userprofile%\desktop\putty.reg" HKEY_CURRENT_USER\Software\Simontatham

It will create 'putty.reg' file on your Desktop.
Copy it to the destination computer, right-click and select "Merge".
It will import all putty registry data to the new machine.

Worked for me like a charm.

Saturday, January 23, 2010

Adding a network printer to another computer

I bought a new HP 6500 Wireless with WiFi and Ehternet. The installation went smooth, but when I wanted to add it to other computers in my home network no computer could see the printer. At least I did not know how to configure them to see the new network printer. Using "Browse" or "network" options in "Add printer" dialog did not find the HP 6500 device.
This guide show how to configure a MS Windows computer:
http://uis.georgetown.edu/software/documentation/winxp/winxp.network.printer.html

Friday, January 08, 2010

MySQL FULLTEXT search and stopwords

If you are trying too look for a word like 'yours' in the TEXT MySQL field you will never get any result. This is because 'yours' is one of the 'stopwords' ignored in the MySQL searches.
Here is the list of all such stopwords


The bad thing is that this behavior does not change even if you search in BOOLEAN mode. This note describes this as a requested fix for some later MySQL release.

Anyway, if you want to search for just ANY word, without taking in consideration the 'stopwords' list of MySQL, add this line

ft_stopword_file=""


in [mysqld] section of your my.cnf file (for XAMPP on Win xamp-folder/mysql/bin/my - no extension)

Next:
a) restart mysql daemon / service
b) rebuild tables indexes, e.g. by the following SQL comand:

REPAIR TABLE `Texts` QUICK

Now you can search for words like "can", "me" and "you" and - what a surprise! - find the records containing them.

Thursday, December 17, 2009

Free antiviruses compared - AVG vs. Avast vs. Antivir

Well, I tried all three of them in the real work environment.
For the last couple of years I was using AVG and it worked good for me.
Once configured, it smoothly run on background doing it's job.

However, for the last 6 months or so I noticed that my Thunderbird (2.0.0.23 at the time of writing) was getting slow. It was slow on emails download, on emails browsing and on emails delivery. I also found that 1 of my 4 Quad CPU cores was at 100%, executing one of AVG child processes. I tried to re-configure AVG or re-install the newest version from the scratch and I looked for anything wrong with my Thunderbird configuration, but was unable to find any clue.

Additionally, I noticed that the latest free AVG 9.0 won't auto-update anymore. It requires manual update, which is obviously a serious problem for busy people. I can not remember that my anitvirus is not updated and AVG 9.0 even does not notify me about that.

So I ended up removing AVG after being their user for a long time. Now the options were Avast! or Antivir.

I installed both in parallel on a test computer, just to let them breath for a while. I am glad I did that since after a few days I removed Antivir. It could be a great piece of software, but it's German creators decided to show you a periodic reminder (daily or may be once in a few days) that the paid version gives you more protection. So the first thing you see when you open your computer is a big pop-up window "buy Antivir". Thank you, I removed this nice auto-reminder software when I got the second "buy now" message.

Thus I am with free Avast! antivirus now. Avast! works good with my Thunderbird, all my email issues gone. Emails download is fast and Thunderbird never freezes up anymore on emails browsing or deletion. Like all the others, Avast! has it's own weird stuff, like the default voice notification 'virus database is updated'. Fortunately, sound can be switched off through Settings->Sounds->Disable Avast Sounds.
A few more annoying things that I yet did not found how to avoid yet include:
- small auto-closing pop up notification window on auto-update. I do not want to see it.
- pop-up if an infected email arrived - I would like Avast! to take a default action (delete the attachment / virus in my case) and never show me any window.

Anyway, at the moment Avast! is the best choice for my environment.

Wednesday, November 11, 2009

Installing ImageMagick on Fedora 8 Linux VM

There was a relatively old version of software installed, so I preferred to install from source instead of 'yum install ImageMagick' who told me 'there is no new versions'. I should be verifying why my repositories say that, I know...

Anyway, it was a very easy task. Here are the simple instructions how to install from source: http://www.imagemagick.org/script/install-source.php#unix

Summarizing that, there are just a few simple commands (you should get root permissions or use 'sudo make install' instead of 'make install' below)

tar xvfz ImageMagick.tar.gz
cd ImageMagick-version
./configure
make
make install


'make' took some time, but 'make install' on my machine failed with:
'Can't locate ExtUtils/MakeMaker.pm' error in Makefile.PL

I solved this by installing the missing package:

yum install perl-ExtUtils-MakeMaker


and running 'make install' again. Running

convert logo: ml.gif


silently created an ImageMagick logo image that can bee viewed in 'ml.gif'

Done