As of late I started to notice my little VPS server had more difficulty keeping up with the amount of data it has to sent to the webbrowsers. I knew that the amount of requests increased and after some tracking I found out that the average page size also increased.
Keep in mind the average page size is not only the size of the HTML but also adding the external CSS, JavaScript and images. Which could dramatically increase the amount of data the users are downloading. So I started looking in the compression options of Apache 2.0
First I looked on the official Apache page, but as usual the data is probably available but not very user friendly. So after some testing and crashing I found out the following procedure which seems to work fine to enable compression per Virtual Host.
Firstly enable the module that supports compression by executing:
:> ln -s /etc/apache2/mods-available/deflate.load /etc/apache2/mods-enabled/deflate.load
This will instruct Apache to load the needed library (module) for compression using GZip. The second thing you will need to do is add the following lines to every single Virtual Host you want to use compression on.
<Location / >
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
</Location>
This will enable the compression for output (everything sent to the end-user) but not for incoming requests, which in my case is enough compression for right now. It also exludes some browsers that do not support compression.
Now restart or reload your apache by running the statement below and your website should support compression. This will make the loading of pages faster, though the client software needs to decompress the pages from this point on.
:> etc/init.d/apache2 reload
If you have any trouble enabling compression just leave a message and I’ll try and help you where I can.
Ok over the weekend I spent some time to finally set up my personal mail server on the VPS system I have. I had been planning this for some time, and made several unsuccessful attempts. But this weekend after spending some hard time on it I finally got it working.
My setup is as follows:
A short while back I wrote a quick review on the beta of Netbeans 6.5 and that it had some issues. Since the final version was released some time ago I thought it was time for a new review. This time of the final version.
The reason for me not to write one straight away was simple, I first wanna play around a little to find all the pleasant features and those less pleasant ones.
The first thing you expect is this new version to be bigger, better and the best one yet. Well it is bigger in size, with 190MiB for just Java development. So this means a lot more time downloading, but hey that’s a one time thing.
So lets move onto something more relevant. Is it better then Netbeans 6.1. Lets summorize some of the issues I had with the previous version and see if the problem is solved:
So are there any other changes that would make you consider moving from Netbeans 5.5 to 6.5?
Well have there been any changes that would make you wanna switch to the new version.
Unfortunattely not all is good in the world of Netbeans. There are also some new bugs, some of which are really annoying.
As a final note: is it worth upgrading to this version. Then I’d have to say hell yeah, it’s a lot better then previous versions. If you are a PHP developer however I suggest not using it, for the moment. Especially when you are already using Zend-Studio, which is still a lot better.
Once you are running a linux server you can choose to do the login by username and password authentication or by certificate authentication. Personally I always choose for the latter as it is more difficult to intercept or hack in to.
Setting up certificate authentication is really simple. Just login to the machine as you would normally. Change to the user you are setting-up a certificate for and enter:
ssh-keygen -t rsa
You will be prompted for a password twice. After this is completed two files will be generated. One being the public file and one being the prive file. You need to download the private file from the server and store it somewhere safe. The public key needs to be copied to:
~/.ssh/authenticated_keys
After this you will be able to login to the server using your username and the private certificate. Please note that for Putty you will need to import the generated private key into puttygen and export it into a new private key. This is because Putty does not support the SSH generated private key.
Sometimes when you are developing you encounter the stranged errors. Today is just such a day. I’m right now having issues with memory access violations in on of the programs I’m developing.
This on its own is not that big of a deal, but I can’t seem to trace down why it’s happening. If I debug the function that causes the error has no issues. No memory violations, but when I continue running (without debugging every single call) then all of a sudden at some point in time I get a memory access violation.
Now I don’t exactly know where it’s comming from. It may have something to do with the fact that the object I’m deleting is a prototype of a prototype. And also occasionally gives me an error during compile time that I have no destructor in the class. But when I compile the files one by one it does not give this error. And the class in question does have a default destructor.
Hmm, guess it’s time for some real line by line debugging and digging into the internet about the obscure error message I got.