Automating Apache and PHP Updates

A lot of hosts that deploy a large number of servers are automating updates instead of running them manually. While cPanel updates can be automated as well, it’s become a common question of how to automate Apache and PHP updates across a large number of servers without having to manually run EasyApache on each server,…

Read more

Fixing Permissions of Valiases

I wrote this script a while back to fix the permissions of alias files in /etc/valiases when users were having trouble creating forwarders. You can also download the script in plaintext here. #!/bin/bash # Script to fix permissions of valiases # Written by: Vanessa Vasile 5/17/10 # http://thecpaneladmin.com for domain in `cat /etc/userdomains |awk ‘{print…

Read more

Assign Multiple IP Addresses on One Account

By default, cPanel supports the usage of one dedicated IP per account. However, you can get around this by editing just a few files on the server. Here are the steps: 1. Edit /var/cpanel/userdata/$user/$subdomain.$maindomain for each subdomain (for addon domains you’ll usually edit the file for the subdomain associated with the addondomain) and change the…

Read more

How to Enable Passive FTP

Passive FTP is not enabled with pure-ftp by default. To enable this, edit /etc/pure-ftpd.conf and uncomment out this line: PassivePortRange 30000 50000 This means that FTP will answer passively on the range of ports between 30000 and 50000, so you may want to narrow the scope to something like 30000 to 35000. Once you do…

Read more

Executable not set-uid root

One of the servers here at work was giving a 500 Internal Server error whenever a PHP page was loaded. Among the various things that can cause this error when you’re running PHP in CGI mode (suPHP), this error showing up in the Apache log was most unusual. Turns out it’s due to the suphp…

Read more

Log in