Archive for the tag 'Examples'

SBDavid

update_php_mime_types Examples

update_php_mime_types Examples

update_php_mime_types –verbose

Update all user .htaccess files that already contain PHP MIME mappings.

update_php_mime_types –user=buddy –force=4 –verbose

Set buddy’s main .htaccess file to use PHP 4 by default.

update_php_mime_types –user=buddy –strip –verbose

Remove all PHP AddHandler lines and marker comments from buddy’s .htaccess files.

Reference: http://cpanel.net/

SBDavid

vzctl command examples

vzctl command examples

Create a Container with ID 444 and IP 10.100.1.2, based on the Debian 5 OS template.

# vzctl create 444 –ostemplate debian-5.0-x86_64

To set the IP address and hostname.

# vzctl set 444 –ipadd 10.100.1.2 –hostname example.com –save

Start the newly created Container:

# vzctl start [CTID]

Examples that show some features of TCP wrapper

If you just want to restrict ssh connections without configuring or using /etc/hosts.deny, you can add the following entries to /etc/hosts.allow:

sshd: station1 station2 station3
sshd: ALL: DENY

The version of TCP wrapper that comes with Red Hat also supports the extended options documented in the hosts_options(5)man page. Here is an example how an additional program can be spawned in e.g. the /etc/hosts.allow file:

sshd: ALL : spawn echo “Login from %c to %s” | mail -s “Login Info for %s” log@loghost

For information on the % expansions, see “man 5 hosts_access”.

The TCP wrapper is quite flexible.

And xinetd provides its own set of host-based and time-based access control functions. You can even tell xinetd to limit the rate of incoming connections.

The TCP wrapper is quite flexible. And xinetd provides its own set of host-based and time-based access control functions. You can even tell xinetd to limit the rate of incoming connections.