Organizational Research By

Surprising Reserch Topic

Is your Web Server Configured to Pass Dynamic Content to a Script Processor?


If you are using a database backend, you almost certainly are using a programming language like PHP to process request for dynamic content, fetch the information from the database, and render the results.

If this is the case, you need to make sure that your web server is configured correctly to pass requests to the script processor.

In Apache, this generally means making sure that mod_php5 is installed and enabled. You can do that on Ubuntu or Debian by typing:

sudo apt-get update
sudo apt-get install php5 libapache2-mod-php5
sudo a2enmod php5

For CentOS/Fedora systems, you'll have to type:

sudo yum install php php-mysql
sudo service httpd restart

In Nginx, this is a bit more complicated. Nginx doesn't have a PHP module that can be enabled, so we need make sure that we have php-fpm installed and enabled in our configurations.

On an Ubuntu or Debian server, ensure that the components are installed by typing:

sudo apt-get update
sudo apt-get install php5-fpm php5-mysql

On CentOS or Fedora, you'd do this by typing:

sudo yum install php-fpm php-mysql

Since the PHP processor isn't a part of Nginx, you need to tell it to pass the PHP files explicitly. Follow step four of this guide to learn how to configure Nginx to pass PHP files to php-fpm. You should also take a look at the portion of step three that deals with configuring the PHP processor. This should be pretty much the same regardless of your distribution.

asked Jun 9, 2015 in LINUX by rajesh
0 votes

Related Hot Questions

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.