Archive for the ‘Sysadmin Shortcuts’ Category

This post is password protected. To view it please enter your password below:


This post is password protected. To view it please enter your password below:


add this to the /etc/httpd/conf/sites/www.example.com file:


<Directory "/home/sites/www.example.com/html/webmail/">
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://%{SERVER_NAME}/webmail/$1 [L,R=303]
</IfModule>
</Directory>

1. create a cpio file from the RPM:
# rpm2cpio name_of_package.RPM > name_of_package.cpio

2. extract the desired file from the cpio file:
# cpio -id < name_of_package.cpio ./full_path_and_name_of_the_file_you_want

3. the file will be in full_path_to_the_file_you_want relative to the directory in which you ran the cpio command.