How do I configure PHP App Server

To perform the necessary configurations, press the Config button next to the application server. In the case the several application servers that can configure them together or separately. To do this follow the steps:


Open the drop-down menu at the top of the configuration tab. It includes the list of all of the app servers in the environment


Choose the one I need and make the configurations.
  • To apply the changes:
  • only for the chosen server click Save only for the current instance button from drop-down menu;
  • for all the servers click Save for all instances.


Note: if I create/rename a file or folder in the Configuration manager, this will be applied only in the list of the chosen node. I can’t save this change for all of the app servers available in the environment. If want to also create/rename the file or folder in the other servers I need to do this manually.

Below I can see the list of the configuration files available for editing in the PHP application servers:

  • Apache
  • NGINX-PHP

To get more information on which settings can be changed in the provided config folders, use the appropriate descriptions:

  • etc
  • conf
  • conf.d
  • webroot
  • cron
  • key
  • modules

ETC

The main PHP server configurations are performed in the php.ini file which is located in the etc folder.
For example, here I can set the required:

  • PHP extensions
  • PHP accelerators
  • Caching for NGINX-php
  • Storing PHP sessions in Memcached
  • PHP.INI Security Configurations
 

 

CONF

  • For the Apache application server the main configuration file is the httpd.conf located in the conf folder. For example, by using it, I can perform the following actions:
  • set up Multiple Domains
  • enable custom Apache modules
  • use WebDav module
  • perform necessary security configurations
  • configure name-based virtual host
  • enable statistics module to view my server's statistics


Note that if I change any configurations in httpd.conf file I need to delete the following string in order not to lose my custom settings while update:

# autoconfiguration mark.



The number of workers for processing PHP requests is increased automatically in an Apache server depending on the cloudlet amount I stated for it. 

To check this find and remember the MaxrRequestWorkers value (in httpd.conf file).


After that, change the topology of the environment by increasing or decreasing the cloudlet limit for the server.
Return to the conf > httpd.conf file. As I can, see the number of MaxRequestWorkers has increased/decreased.

Note that this function will be disabled if I remove the following string from the httpd.conf file:
# autoconfiguration mark

 
NGINX
For performing necessary configurations for an NGINX-PHP server the nginx.conf file, located in conf folder, is used. Use it to set up the following configurations:

  • set up Multiple Domains
  • use WebDav module
  • perform necessary security configurations

 
CONF.D
The conf.d folder is used for storing and managing sub configs.


 

WEBROOT
The webroot folder is used for storing the unpacked application deployed to the environment.

 

CRON

App servers include a cron folder with the config file where cronjobs can be configured.

Detailed information on Cronjob configuration can be found in the Setting Up a Cronjob document.

 

KEYS
The keys directory is used as a location for uploading any private key which is needed for the application.
Generate the key, save it as a simple file and upload to the key folder.
Now I can use it for different cases by simply stating the path to the key: 
/var/lib/jelastic/keys/{key_file_name}




 MODULES
The modules folder contains the php modules available in Jelastic by default. I can also upload the custom php modules to this folder, in order to activate them.
For more information navigate to PHP Modules document.

 

Apache
Folder
File
Path
etc
php.ini
/etc
conf.d
modules.conf
aliases.conf
geoip.conf
mod_security.conf
php.conf
ssl.conf
welcome.conf
/etc/httpd/conf.d/
conf
httpd.conf
/etc/httpd/conf/
webroot   /var/www/webroot
cron
apache
/var/spool/cron
key   /var/lib/jelastic/keys
modules   /usr/lib64/php/modules

 

NGINX-PHP
Folder
File
Path
etc
php-fpm.conf
php.ini
/etc
conf.d
virtual.conf
ssl.conf
/etc/nginx/conf.d
conf
nginx.conf
/etc/nginx
webroot   /var/www/webroot
cron
nginx
/var/spool/cron
key   /var/lib/jelastic/keys
modules   /usr/lib64/php/modules

 


Was this article helpful?

mood_bad Dislike 0
mood Like 0
visibility Views: 14313