PHP as an Apache Module?

When PHP runs as an Apache module, PHP files work under the Apache user/group known as “nobody”. For example, when a PHP file needs to write to another file or create/remove a file, it does so under the name “nobody”. In order to allow “nobody” to do this, you need to set specific permissions on the file/directory, such as 777 – which translates to read/write/execute by user/group/world. This is insecure because you have not only allowed the web server (Apache) to read/write to the file, you have also allowed everyone else on the server to read/write to the file as well!

Due to the above conditions, when a PHP file creates or uploads a new file to your account, the new file will be owned by the user “nobody”. If you FTP into your account, all files owned by “nobody” will not be available for you to move, rename or delete. In this case, the only way to remove the “nobody” owned files would be through a file on the server or to contact support and ask for the file ownership to be changed back to your username.

How to change SMTP server IP (Exim IP) on WHM server

Login to WHM

  • Click Exim Configuration Editor
  • Check the box next to:
  • “Send outgoing mail from the ip that matches the domain name in /etc/mailips (*: IP can be added to the file to change the main outgoing interface)”
  • Save Changes
  • Then edit the file /etc/mailips
  • from shell and add: *: #ReplacewithnewIP#
  • service exim restart

Login to Shell

  • Access the Exim configuration file:

nano /etc/exim.conf

  • Locate remote_smtp
  • The default setup will look like:

remote_smtp:
driver = smtp
interface = ${if exists {/etc/mailips}{${lookup{$sender_address_domain}lsearch{/etc/mailips}{$value}{}}}{}}
helo_data = ${if exists {/etc/mailhelo}{${lookup{$sender_address_domain}lsearch{/etc/mailhelo}{$value}{$primary_hostname}}}{$primary_ho stname}}

  • Change to:

remote_smtp:
driver = smtp
interface = 12.14.12.14 # Change to your server IP address.

  • Save changes and exit.
  • Restart Exim

If there is an exim update when you upgrade your cPanel server you will need to re-enter the interface again.

 

How to set up Private name servers in WHM

1. Sign in to your server’s WHM interface and discover the route area on the left called Basic cPanel and WHM Setup, under Server Configuration. This is the primary thing on the left route bar.

2. When you stack this screen interestingly you may see that two nameservers, utilizing a similar space name as the server’s hostname, are as of now set up. Supplant those name servers with your coveted name servers and include the IP.

3. Tap on Assign IP address and Add an A section for Each name servers .Presently you are prepared to enlist your name servers at your site recorder end.

How to Add multiple IPs to the server with WHM

1. Login to cPanel Webhost Manager (WHM) on the server.

2. On the left side board, explore the IP Functions menu, and afterward, tap on Add a New IP Address interface.

3. Enter the IP address in the IP(s) to include field. In spite of the fact that the connection says An IP Address, you can without much of a stretch present various or more than one IP delivers to the server on the double. For more than 1 IP address, indicate in Class C CIDR arrange or 192.168.0.1-254 organization. For instance, 192.168.4.128/25, 192.168.3.5-10, 192.168.99.55-230.

4. Adjust the subnet cover default estimation of 255.255.255.0 to the legitimate an incentive for the IP address(s) in the Subnet Mask field, if required. Typically this esteem will be given by your facilitating supplier.

5. Tap on Submit catch

How To Install eAccelerator In Cpanel

eAccelerator is a PHP quickening agent and streamlining agent. It enhances execution by re-utilizing assembled PHP scripts and streamlining them to accelerate their execution.

With a specific end goal to have it introduced you will require a committed server condition since it requires worldwide server changes. In cPanel its establishment is simple and quick after these two stages:

1. Ensure PHP keeps running as DSO Apache module. For this reason, sign into your cPanel server WHM and go to ‘Design PHP and SuExec’. There ensure that the PHP 5 Handler is set to dso. 2. Next, sign in as root by ssh and issue the accompanying summon:

/scripts/phpextensionmgr install EAccelerator

With the above basic and simple strides, your PHP (site all in all) execution ought to be impressively enhanced with the assistance of eAccelerator.

Install Firewall on a cPanel Server

First, you would need to login as root via ssh, then as root issue the following commands:

wget http://www.configserver.com/free/csf.tgz
tar zxfv csf.tgz
cd csf
./install.cPanel.sh

Now the CSF establishment is finished and the arrangement document should suit your necessities, to alter the CSF setup issue this summons:

pico /etc/csf/csf.conf

Set the TESTING variable to 1 instead of and make sure that the MONOLITHIC_KERNEL variable is set to 1 this is important for OpenVZ VPS servers You may open/filter incoming and outgoing ports by editing the TCP_IN and TCP_OUT variables. Save your configuration by pressing CTRL + x, when asked press “y” then press the enter key

Now start CSF by issuing:

/etc/init.d/csf start

How to Install Zend Optimizer with cPanel.

Zend Optimizer is a PHP addon which offers storing to enhance speed when stacking destinations; it can build execution by up to 40% by reserving as often as possible saw segments of PHP pages. Zend Guard likewise is helpful for encoding PHP documents to secure source code.

Here’s the manner by which to introduce Zend Optimizer:

1.    Login to your server by means of SSH

2.    Run:/scripts/installzendopt

3.    Take after the directions on the screen to introduce Zend Optimizer