Skip to main content

Posts

Showing posts from March, 2013

Website Using HTTPS Protocol

Last week, I changed protocol of my website from http to https. There were steps that i had to do. First, I installed openssl package and mod_ssl # yum install mod_ssl openssl Then, I configured the openssl  and created certificate # cd /etc/pki/tls/certs # make server.key # openssl rsa -in server.key -out server.key # make server.csr # openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 3650 # chmod 400 server.* After that, I changed configuration of httpd/apache #nano /etc/httpd/conf.d/ssl.conf DocumentRoot "/var/www/html" ServerName www.server.world:443 SSLCertificateFile /etc/pki/tls/certs/server.crt SSLCertificateKeyFile /etc/pki/tls/certs/server.key Last, I restarted the webserver #service httpd restart That's all what i did last week to change my website protocol from http to https.

Grep Log for Specific Date Range

We can use the grep command to search for a particular date range e.g. need to grep the data for specific date range. Example from 25 Maret to 27 Maret 2013, the command is : grep -n "2[5-0]/Mar/2013" input_file Or we can use regex if the months is difference egrep  '2[0-5]/(April|May)/2008' logfile