PHP
  • 08 Sep 2023
  • 2 Minutes to read
  • Dark
    Light
  • PDF

PHP

  • Dark
    Light
  • PDF

Article summary

About this Article
This article provides VSP application instrumentation steps for PHP in Apache and NGINX server. It provides steps to determine the values of deployment folder and PHP version required during application configuration on CMS.


Apache

OS - Ubuntu

Reference Application: Basic PHP Demo Application

Deployment Folder

Hosting Multiple Applications

  1. Log in to the server
  2. Verify that the php and apache2 processes are running 
  3. Execute the below command to list all the applications hosted/configured on the Apache server
    apache2ctl -S
    Example: /etc/apache2/sites-enabled/basicPhpDemo.conf
  4. Use the value of the tag “DocumentRoot” for Basic PHP application as Deployment Folder in CMS during Application/Workload creation
    1. Example: var/www/html/apache2/basic/public


Hosting Single Application

  1. Log in to the server
  2. View the file /etc/apache2/apache2.conf. Use the value of the tag “DocumentRoot” for Basic PHP application as Deployment Folder in CMS during Application/Workload creation
    1. Example:DocumentRoot /var/www/html/basic


PHP Version

Execute the below command to find the PHP version

php -v

Example PHP Version: 7.3


OS - RHEL

Reference Application: Basic PHP Demo Application

Deployment Folder

Hosting Multiple Applications

  1. Log in to the server
  2. Verify that the php and httpd processes are running 
  3. Execute the below command to list all the applications hosted/configured on the httpd server
    httpd -S
    Example: /etc/httpd/sites-enabled/basicPhpDemo.conf
  4. Use the value of the tag “DocumentRoot” for Basic PHP application as Deployment Folder in CMS during Application/Workload creation
    1. Example: /var/www/html/httpd/basic/public

Hosting Single Application

  1. Log in to the server
  2. View the file /etc/httpd/htttpd.conf. Use the value of the tag “DocumentRoot” for Basic PHP application as Deployment Folder in CMS during Application/Workload creation
    1. Example:DocumentRoot /var/www/html/basic


PHP Version

Execute the below command to find the PHP version

php -v

Example PHP Version: 7.3


NGINX

OS - Ubuntu

Reference Application: Basic PHP Demo Application

Deployment Folder

Hosting Multiple Applications

  1. Log in to the server
  2. Verify that the php and nginx processes are running 
  3. View the file /etc/nginx/nginx.conf to check the enabled applications on Nginx server. Find the below tag format in the file:
    1. include /etc/nginx/conf.d/*.conf;
  4. View the file /etc/nginx/conf.d and list the all the applications configured on nginx server 
    1. Referred basic php as Demo virtual host. 
    2. Example:/var/www/html/nginx/basic/public

Hosting Single Application

  1. Log in to the server
  2. Navigate to the directory /etc/nginx/conf.dFind the “Root folder and provide it as the Deployment Folder in CMS during Application/Workload creation
    1. Example: /var/www/html/basic


PHP Version

Execute the below command to find the PHP version

Shell
php -v

Example PHP Version: 7.3


OS - RHEL

Reference Application: Basic PHP Demo Application

Deployment Folder

Hosting Multiple Applications

  1. Log in to the server
  2. Verify that the php and nginx processes are running 
  3. View the file /etc/nginx/nginx.conf to check the enabled applications on Nginx server. Find the below tag format in the file:
    1. include /etc/nginx/conf.d/*.conf;
  4. View the file /etc/nginx/conf.d and list the all the applications configured on nginx server 
    1. Referred basic php as Demo virtual host. 
    2. Example:/var/www/html/nginx/basic/public;

Hosting Single Application

  1. Log in to the server
  2. Navigate to the directory /etc/nginx/conf.dFind the “Root folder and provide it as the Deployment Folder in CMS during Application/Workload creation
    1. Example: /var/www/html/basic


PHP Version

Execute the below command to find the PHP version

Shell
php -v

Example PHP Version: 7.3


Was this article helpful?