In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Know the procedure for nginx configuration to support php-fpm? This problem may be often seen in our daily study or work. I hope you can gain a lot from this question. The following is the reference content that the editor brings to you, let's take a look at it!
Nginx configuration supports php-fpm steps:
Create a www-data user who cannot log in, belonging to the www-data group
Groupadd www-datauseradd-s / sbin/nologin-g www-data www-data
Modify nginx.conf
Vim / etc/nginx/nginx.conf.# causes nginx to run user www-data;.# as www-data user to reload configuration service nginx reload
Modify php-fpm.conf
Vim / etc/php-fpm.d/www.conf.# makes php-fpm run as www-data users and user groups user = www-datagroup = www-data.#nginx and php-fpm on the same server, unix socket interprocess communication is recommended Listen = 127.0.0.1:9000listen = / var/run/php71-fpm.sock.# set .sock access permissions, which need to be consistent with nginx users listen.owner = www-datalisten.group = www-datalisten.mode = 0660.# reload configuration service php-fpm reload
Configure nginx to support php-fpm
Vim / etc/nginx/conf.d/default.conf. Location ~\ .php$ {root / usr/share/nginx/html; # fastcgi_pass 127.0.0.1 root 9000; fastcgi_pass unix:/var/run/php71-fpm.sock; fastcgi_index index.php; # fastcgi_param SCRIPT_FILENAME / scripts$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params }. # reload the configuration service nginx reload. Thank you for reading! After reading the above, do you have a general understanding of the steps to configure nginx to support php-fpm? I hope the content of the article will be helpful to all of you. If you want to know more about the relevant articles, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.