Tag Archive: linux

Edit the configuration file:
#  vim  /etc/httpd/conf/httpd.conf
Press ‘shift+g‘ to go at the end of file, and add:

<Directory “/var/www/html”>
AuthType Basic
AuthName “Authorized Users only”
AuthUserFile  /etc/httpd/authpass
Require user user1 user2                     //add all usernames


#  htpasswd  -b  /etc/httpd/authpass [username]  [password]

#service httpd restart (it will ask for username and password for accessing the website.)

OR edit  “/etc/hosts”, add                     http://www.abc.com

Access www.abc.com from browser.

You can create a simple webserver(without SSL) from here.

Create a certificate:

#  cd  /etc/pki/tls/certs


Create private key:

#  make  server.key

Enter the passphrase.

Remove passphrase from private key:

#  openssl  rsa  -in  server.key  -out  server.key


#  make  server.csr

Enter the relevant information for your certificate.


Create certificate:

#  openssl  x509  -in  server.csr  -out  server.crt  -req  -signkey  server.key  -days  365

#  chmod  400  server.*


Configure SSL:


#  yum  install  mod_ssl


#  vi  /etc/httpd/conf.d/ssl.conf


Edit line no. 77 & 78:

DocumentRoot            “/var/www/html”

ServerName                http://www.abc.com:443


Edit line no. 105:

SSLCertificateFile        /etc/pki/tls/certs/server.crt


Edit line no. 112:

SSLCertificateKeyFile              /etc/pki/tls/private/server.key

(Note: Private key is also present in “certs” directory, you can specify that one also or you can copy it in “private” directory.)


#  service httpd start


Now access https://www.abc.com from browser and install the certificate.(Map server name http://www.abc.com with ip address in “/etc/hosts”)



Chat Server Configuration

Openfire can be used to create chat server in RHEL. The setup and configuration is fairly straightforward.

Spark can be used on the client system.


Click to Download

The installation and configuration instructions can be found here.

Happy chatting.