Tuesday, May 22, 2007

Use SSL in Apache 2.0

1. openssl genrsa -out www.mydomain.com.key 1024

2. openssl req -new -key www.mydomain.com.key -out www.mydomain.com.csr

3. openssl x509 -in www.mydomain.com.csr -out www.mydomain.com.crt -req -signkey www.mydomain.com.key -days 365

cp www.mydomain.com.key /etc/httpd/conf/

5. cp www.mydomain.crt /etc/httpd/conf/

6. Apache 2.0 configuration:

NameVirtualHost *:443
<Virtualhost www.mydomain.com:443="">
DocumentRoot /var/www/html
SSLEngine on
SSLProxyEngine on
SSLCertificateFile conf/www.mydomain.com.crt
SSLCertificateKeyFile conf/www.mydomain.com.key

Friday, May 18, 2007

Adding a Second IP to an Existing Ethernet Card on Linux

1. Log in as root
2. Change directory
cd /etc/sysconfig/network-scripts
3. Locate the file ifcfg-eth0
4. Make a copy of it with a different name:
cp ifcfg-eth0 ifcfg-eth0:0
5. Edit the new file ifcfg-eth0:0. Locate the word DEVICE and change eth0 to eth0:0
6. Change the IP address besides the word IPADDR to the desired IP
7. Now save the changes and issue the command ./ifup eth0:0 to start listening on the new IP address