How to Hide Apache2 and PHP version without using mod_security in Ubuntu Linux

Although security by obscurity is not the best policy to protect your IS assets, but it is still useful to thwarts simple network scanner or newbie crackers.

Note: This tip is written for Ubuntu Linux, the steps is similar to other GNU/Linux distro, albeit with a slight variant.

Hiding Apache2 version
Edit /etc/apache2/apache2.conf

Add these lines at the end of the file:
ServerSignature Off
ServerTokens Prod

Restart Apache2
[bash]
sudo /etc/init.d/apache2 restart
[/bash]

Hiding PHP version
Edit /etc/php5/apache2/php.ini file

Find these lines, and switch it off:
expose_php = Off
display_errors = Off

Additionally you may disable certain ‘risky’ functions in php by editing the disable_functions line:
disable_functions = phpinfo, system,show_source,

Finally, you may restart Apache2 web server.
[bash]
sudo /etc/init.d/apache2 restart
[/bash]

Public Domain vs Open Source License, which to choose ?

*Note that I’m not a legal expert or an attorney, this is just based on my personal experience and internet search*

There are people who asked me about why bother to release a piece of software or code under Open Source License instead of putting it in Public Domain.

First of all it is a matter of personal choice if write the code or the said work on your own, . But if you release your work under open license (open source or creative commons), you can still retains the copyright (ownership) of the materials that you’ve released. Technically, people who used your work has to adhere to the copyright license terms of your choosing, including freeing you from liabilities if the software is broken or causes harm. Licensing your work will acknowledge you as the owner and those who used your application, and you retain legal rights for your work.

On the other hand — once you have put your work on Public Domain, you will lose your rights on the work, as the work would have no copyright-owner and isn’t protected by copyright law. So people are free to use the materials without any restrictions at all, including to incorporate the material into their work and make it proprietary and subsequently copyrighted it without legal repercussion. You will lose the legal right on your work.

Public domain isn’t a license, it is merely a statement that the software was given to the public and to make things more complicated, some countries disallow public domain material, meaning that the writer will not be protected by the copyright law if the software causes harm to others (the ABSOLUTELY NO WARRANTY and LIMITED WARRANTY, or AS IS clause).

Remember: Public Domain is not recognized internationally and is not stipulated under Berne Convention and in some countries, the author can’t disclaim moral rights.

Therefore, it is more wise to release the the software under a permissive license (copyright), rather than releasing it under public domain right away.

References
1. Creative Commons vs Public Domain
2. Is Public Domain software Open-Source ?
3. Why the Public Domain isn’t a License?
4. Why public domain release is a bad idea

Does anyone here still uses Java Applets?

When I was studying in the university (more than 10 years ago), I learn how to build and embed Java Applets on web pages using Java 1.0 (after that Java 1.2), the functionality is quite limited since there’s no default 3D support in Java yet. Compared to Flash (then Flash 3.0 during that time), Java Applet is more suitable for math and scientific application, generating graphs and kaleidoscope base on mathematical formula, and everything.

duke java logo

Heck, Netscape Navigator still rules the day during that time. But what about now? With the technology explosion, does anyone here still use Java Applets?

3 Reasons Behind why I Hate CPanel Web Hosting

Adding Subdomain / Domain creates a subdirectory
Adding Subdomain, and add-on Domain is a pain-in-the-ass as it creates a subdirectory in the root web directory, meaning that any web-users can abuse this by adding trailing subdirectory ‘subdomain’ http://yourdomain.com/subdomain/ to access http://subdomain.yourdomain.com/

Outdated Pre-package Software
Cpanel came with outdated pre-packaged software, PHP, MySQL and PostgreSQL and other libraries that is outdated compared to the one available on the host operating system. The problem is not about how outdated the software packages are, but the how often these package are being patched. CPanel vendor very notorious for not providing timely patches which would compromise the security of the web application.

Can’t change DNS setting easily from the panel
Unlike DirectAdmin, CPanel does not offer an easy way to change DNS record of domain easily as the option is not offered by default to the control panel. Although this can be mitigated by having your domain points to a 3rd party NS, it’s still one of the thing that gets me down with CPanel.

My Thoughts
CPanel is an excellent control panel for beginner as it offers a lot of options and functionality with a simple user-interface. However, personally, I prefer to use other control panel such as DirectAdmin or Plesk for my web hosting use.

p/s: Currently I’m on VPS without standard control panel.