Ubuntu 10.04 is quite old, you can’t just upgrade it right away using do-release-upgrade, you should try the following steps: sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install update-manager-core sudo do-release-upgrade If that’s still doesn’t work, replace /etc/apt/sources.list with this file # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to# newer versions of the distribution. deb http://ubuntu.datahop.net/ubuntu/ precise main restricted deb-src http://ubuntu.datahop.net/ubuntu/ precise main restricted ## Major bug fix updates produced after the final release of the ## distribution. deb http://ubuntu.datahop.net/ubuntu/ precise-updates main restricted deb-src http://ubuntu.datahop.net/ubuntu/ precise-updates main restricted ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, pleaseRead More →

RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !^/(file|member|photo) [NC] RewriteRule . /index.php [L] RewriteRule ^member/([0-9]+)/ /member_profile.php?m=$1 RewriteRule ^file/([0-9]+)/(.+)? /file.php?f=$1 RewriteRule ^photo/([^/]+)/([^/]+)/(.+)? /file.php?type=$1&ref_id=$2&photo=1Read More →

Due to the number of spammers using port 25 to send emails, many large ISPs has blocked this port from their network. This means if your client is behind their network and try to connect to your company mail server on port 25 to send email, it will be blocked. We can’t ask the ISP to unblock it, so our solution is to create an additional port on our server so that our client can connect to that port instead of 25 to send email. If you are using WHM, it’s very easy, follow these steps below: Login into your server’s WHM (https://[main server IPRead More →

I need to run some PHP scripts in the background, this script should still run while i log off my SSH session. I first try php myscript.php & It run in the background, but then when my SSH ends, the job will be also suspended. After some research, finally, i found that i can use nohup command to do this job, it’s very simple nohup php myscripts.php & Remember to add & at the end of the script. If you want to check if it’s actually runnning, use this commmand jobs -lRead More →

By default Apache only allows up to 150 connections , if you want more, you need to change the MaxClients parameter in apache.conf or httpd.conf . Apache also limit the max clients to 256 , if you want to override this value, you need to add ServerLimit. Here is an example to increase the max clients to 600. # prefork MPM # StartServers: number of server processes to start # MinSpareServers: minimum number of server processes which are kept spare # MaxSpareServers: maximum number of server processes which are kept spare # MaxClients: maximum number of server processes allowed to start # MaxRequestsPerChild: maximum numberRead More →

If you have multiple servers connecting to internet, these servers use Samba to share file with each other. Normally, you will Samba server for this purpose. After you install Samba & configure the server, all servers now can access file sharing now. But there is another issue, you realize that internet users can also access these files. How can we block internet users while still these servers sharing file with each other. There are many solutions, but here is my proposal: We create a virtual interface network, all our servers will have a 2nd virtual private interfaces , to do this you can add someRead More →

Just imagine, you manage a server remotely. The server has many disks, one day one of the disk could be failure. How can you tell the onsite engineer which drive is failure? The answer is you need to give the engineer the serial of the drive. So, the next question is , how can i get the serial? When the drive is dead, you can’t not get its serial, so you must record your server hard disk serial number, when something happens, you can access to your document and get it. Here is the command to get the serial number in Ubuntu: myuser@netbook:~$ sudo hdparmRead More →

Simply run this command, replace example.crt with your actual certificate file: $ openssl x509 -noout -text -in example.crt Certificate: Data: Version: 3 (0x2) Serial Number: .. Signature Algorithm: sha256WithRSAEncryption Issuer: C=GB, ST=Greater Manchester, L=Salford, O=COMODO CA Limited, CN=COMODO RSA Domain Validation Secure Server CA Validity Not Before: Sep 10 00:00:00 2014 GMT Not After : Sep 10 23:59:59 2015 GMTRead More →