1. Home
  2. Getting Started
  3. Manage Server Settings

Manage Server Settings

In this documentation, we will show you how to manage your Server Settings.

First, select the server from Server Dashboard for managing server settings.

PHP Settings

Note:- This Settings is for Servers, not for Applications. If you want to change Application Settings go to our documentation – Manage App Settings

Some PHP Settings for your servers that you might want to change:

Execution Limit

This setting will change maximum time allocated for execution of each script.
Normally its default value is set to 30 Seconds.

max_execution_time = 30

Upload Size

It is used to set the maximum file size for uploading. This means that the file with greater size than mentioned will not be uploaded to that particular server.

upload_max_filesize = 8M

Memory Limit

It is used to set maximum memory limit a script may consume during its execution. Its default value is set to 128M.

memory_limit = 128M

Display Errors

This directive controls whether or not and where PHP will output errors, notices, and warnings too. Error output is very useful during development, but it could be very dangerous in production environments. Depending on the code which is triggering the error, sensitive information could potentially leak out of your application such as database usernames and passwords or worse.

display_errors = Off

Error Reporting

This directive informs PHP of which errors, warnings, and notices you would like it to take action for. The recommended way of setting values for this directive is through the use of the error level constants and bitwise operators.

error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT

The user can choose 1 of the 3 option provided for error reporting:

  1. Default – [E_ALL & ~E_DEPRECATED & ~E_STRICT]
  2. Development Environment – [E_ALL | E_STRICT]
  3. Production Environment – [E_ALL & ~E_DEPRECATED]

By default, PHP is set to take action on all errors, notices, and warnings EXCEPT those related to E_NOTICE and E_STRICT, which together cover best practices and recommended coding standards in PHP.The meaning of setting values are as follows:

E_ALL – All errors and warnings (includes E_STRICT as of PHP 5.4.0)

E_DEPRECATED – warn about code that will not work in future versions of PHP

E_STRICT – run-time notices, enable to have PHP suggest changes to your code which will ensure the best interoperability and forward compatibility of your code

Max Input Time

It sets the maximum amount of time each script may spend parsing request data. It’s a good idea to limit this time on productions servers in order to eliminate unexpectedly long running scripts. Its default value is set to 60 Seconds.

max_input_time = 60

Max Input Variables

It is used to set the limit of PHP input variables that may be accepted for GET/POST/COOKIE requests. Its default value is set to 1000.

max_input_vars = 1000

PHP Timezone

It defines the default timezone used by the date functions.
Its default value is set to etc/UTC.

date.timezone = etc/UTC

SSH Settings

Few SSH Settings for the server:

Passwordless Login

SSH Passwords are prone to Brute Force Attacks, so to secure your servers try to use SSH Keys instead of SSH Passwords. Check the following check box to allow only SSH Keys for login.
This setting will change following from sshd_confing file as follows:

PasswordAuthentication no

Prevent root Login

If you want to prevent “root user” access from SSH login, check the checkbox below.

It is always a good practice to disable root user access as the root user has all sudo permissions to make changes in the server, and if the root user credentials gets compromised all your system data will be at risk. So it’s better to prevent root user access and make a new ssh user for individual apps so that if one user gets compromised your other data will be still secure.

This setting will change following from sshd_confing file as follows:

PermitRootLogin no

UseDNS

It determines whether IP Address to Hostname lookup and comparison is performed. The default value is No which avoids login delays when the remote client’s DNS cannot be resolved.

  • The value of No implies that the usage of “from=” in authorized_keys will not support DNS host names but only IP addresses.
  • The value of Yes supports host names in “from=” for authorized_keys. Additionally, if the remote client’s IP address does not match the resolved DNS host name (or could not be reverse lookup resolved) then a warning is logged.

If you check the checkbox, it will change following from sshd_confing file as follows:

UseDNS yes

Extra Settings

There are some extra server settings that you might want to change.

  1. Change SSH Port
  2. Change CLI PHP Version
  3. Change IP PHP Version
  4. Clean Server’s Disk

Change SSH Port

Change the port of SSH connection and enhance security. You have to use this port for secure login via Filezilla.
Just change the port number and click “Change SSH/SFTP Port” button beside it to change SSH/SFTP Port. Default SSH Port will be set to 22.

Change CLI PHP Version

This setting is used to change the Version of PHP when you run PHP via command line (for e.g. for composer install).

To do so select the version from the dropdown menu and click “Change PHP CLI Version” button beside it.

Change IP PHP Version

This setting is used to change the version of PHP when you run PHP via http://{IP_ADDRESS}/yourfile.php

Select the version from the drop-down menu and click “Change PHP IP Version” button beside it.

Note:- For changing Application/Website PHP version go to Applications > App Settings to change php version. See our documentation – Manage App Settings

Clean Server’s Disk

This is used to free up extra used space from the servers. It mainly removes the logs files, app backups, removes cache and useless packages.

For doing so click on “Clean Disk”  button under Clean Server’s Disk label.

A modal box will appear, select whichever options apply to you and click on “Clean” button below.

 

Updated on July 15, 2017

Was this article helpful?

Related Articles