Nginx proxy response parsing PHP LAMP environment

1 LAMP configuration

-Y MariaDB MariaDB the install the httpd yum-Server-mysql PHP PHP  (yes branch of mysql MariaDB)

2 Start Service

systemctl start httpd

systemctl start mariadb 

Create a test file

vim /var/www/html/test.php

<?php
phpinfo();
?>

Test http://192.168.200.113/test.php

Modify the server Nginx

vim /usr/local/nginx/conf/nginx.conf


location ~* \.php$ {
proxy_pass http://192.168.20
0.113;
}

Reload the main configuration file

killall -HUP nginx

Test whether the server can parse PHP

192.168.200.112/test.php

 

Guess you like

Origin www.cnblogs.com/shinian12138/p/11528843.html