Category Archives: server setup

Adding SSL to Apache – connection error

Here is the background of the problem: Recently I added SSL certificate (purchased from a CA) to my Apache server. After making configuration changes, opening the port and restarting the server, the https connection still won’t work. From Chrome, I … Continue reading

Posted in server setup | Comments Off

Build your own Linux VPS

5 years ago if you ask me to build my own Linux VPS for my websites I would’ve shaken my head and said it was too much for a non-sysadmin like me. Now I’m pretty comfortable of doing it. I … Continue reading

Posted in server setup | 1 Comment

Configure sendmail to work with Gmail smtp relay

Ok this one was really a thinker. I spent at least 5 hours to get this to work and finally I was able to use Sendmail to relay through my Gmail account. A little background: I have a Linux VPS … Continue reading

Posted in server setup | 56 Comments

Use the third party DNS

Using a third party DNS have some great benefit: By outsourcing the DNS look up the load is reduced on your own server, especially like a VPS or dedicated box which runs everything: Apache, MySQL, Named. Well know DNS operates … Continue reading

Posted in server setup | Comments Off

iptables

Just some iptables cheatsheet : show the current iptables: iptables -L check firewall service: service iptables status enable iptables service: chkconfig –level 345 iptables on save iptables iptables-save save iptables to /etc/sysconfig/iptables service iptables save Ban an IP: iptables -A … Continue reading

Posted in server setup | Comments Off

Installing APC

APC stands for “Alternative PHP Cache”. It’s one of the 3 PHP accelerators out there (the other 2 are Zend and eAccelerator). The installation package can be found here: http://pecl.php.net/package/APC Follow the installtion guide in the package, the apc.so is … Continue reading

Posted in PHP development, server setup | Comments Off

Authentication using .htaccess

It is quite easy to create web server access restriction using the Cpanel. There is a configuration setting for "Password Protect Directories" in Cpanel for setting up a user name and password for directory access. What this really does is … Continue reading

Posted in security | Comments Off

Setup ssh access using public and private key authentication

If you own a Linux box and use ssh to access it over the internet, chances that it will be under unauthorized login attempt or even brute-force attack. Even you have a strong password for your account, the constant poking … Continue reading

Posted in security | 1 Comment

Apache http.conf tuning

There are several parameters in httpd.conf file that I pay attention to. Although the default values normally work out for me, sometimes they need to be tweaked for better performance. HostnameLookups off  Apache can look up the visitor's ip and … Continue reading

Posted in server setup | Comments Off

writing secure PHP code

This is a great post about writing secure PHP code and part 2. The articles pretty much cover all the points we need to look at to write secure PHP code. Additionally this post talks about how hackers can use … Continue reading

Posted in security | Comments Off