It’s simple, just run this command $ openssl req -noout -text -in example.csr | grep ‘Signature Algorithm’ Signature Algorithm: sha256WithRSAEncryption If the value is sha256WithRSAEncryption, the certificate is using SHA-256 (also known as SHA-2). Another common value is sha1WithRSAEncryption, that means the certificate is signed with SHA-1.Read More →

I have some videos that i want other people to download it instead of playing it on the browsers. First, i just try to upload that file to my web document folder and share the link, i found that the user can watch the video directly, this is not what i want, i want the user to download it to their computer, then watch it from their computer later. I did some research and i found that there is a very easy way to accomplish, you just need add the following like to .htaccess file AddType application/octet-stream .mpg AddType application/octet-stream .mov AddType application/octet-stream .mp4 ThisRead More →

Login to your Ubuntu, and run the following command: openssl req -nodes -newkey rsa:2048 -sha256 -keyout myserver.key -out server.csr It then will ask you some information for the certificate, fill them in and complete the process. Country Name (2 letter code) []: (FR in France for example) State or Province Name (full name) [Some-State]: (your state or province name, name of your département in France) Locality Name (eg, city) []: (the name of your city) Organization Name (eg, company) []: (your organization name) Organizational Unit Name (eg, section) []: (do not fill – advised – or enter a generic term such as “IT Department”.) CommonRead More →

Do you have this problem ? – you made the changes in /etc/ha.d/ldirectord.cf , – restart ipvsadm : /etc/init.d/ipvsadm restart you see the changes : ipvsadm -L But after sometimes, you go back and check , the weight has been changed ? WHY ? It’s because there are 2 ldirectord ar running ( you can verify by running top command Kill one of them and check the status (ipvsadm -L) it will fix your problemRead More →

Sometimes, you want to remove the replication , it could be because the replication no longer works, or you don’t want to replicate. Here are some commands that you can use Login to mysql: mysql -uroot -p Enter your mysql root password Run the following command to disable the replication with master. STOP SLAVE; RESET SLAVE; change master to master_host=”, master_user=”, master_password=”; On the master, if you want to disable the replication you should login to mysql and run : stop master Delete all .bin file in /var/log/mysql Edit /etc/my.inf and remove the replication sectionRead More →

When you run mysqldump , by default it will not export your procedures or function , if you want to include these info , you need to add –routines option in your mysqldump command. mysqldump <other mysqldump options> —routines > outputfile.sql Let’s assume we want to backup ONLY the stored procedures and triggers and not the mysql tables and data (this can be useful to import these in another db/server that has already the data but not the stored procedures and/or triggers), then we should run something like: mysqldump –routines –no-create-info –no-data –no-create-db –skip-opt <database> > outputfile.sql and this will save only the procedures/functions/triggers of the <database>.Read More →

There are 3 commands that we can use sar top mpstats You may need to install sysstat package to use these commands : apt-get install sysstat If you install sysstat , enable systat by edit: nano /etc/default/sysstat    -> change ENABLE from false to true.Read More →

Today, my server is out of disk and i see there are lot of files in /tmp , their names are phpXXXX , i know these  files are uploaded by PHP, but why they are not deleted after the scripts end. After a lot of troubleshooting , i found that there is some errors in my apache error log with “child process exit , filesize limit…” i did some research , and found that it’s because apache can not  work with file larger than 2GB , i searched though my file system and saw there are some of my application logs files generated files atRead More →