IT培訓(xùn)網(wǎng)
IT在線學(xué)習(xí)
編輯Apache配置文件
vi /etc/httpd/conf/httpd.conf
安裝PHP7.4 FastCGI進程
php-fpm = php fastcgi process manager
yum --enablerepo=remi-php74 install php-fpm
systemctl enable php-fpm
systemctl start php-fpm
systemctl status php-fpm
安裝配置NGINX1.6
CentOS7光盤自帶
yum install nginx
編輯配置文件:
vi /etc/nginx/nginx.conf
添加內(nèi)容:
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
root /usr/share/nginx/html;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
}
location ~ .php$ {
try_files $uri =404;
root /var/www/html; #nginx使用apache的web目錄,可根據(jù)情況自行指定
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
}
error_page 404 /404.html;
location = /40x.html {
}
......
編輯測試php文件:
vi /var/www/html/info.php
phpinfo();
?>
更多內(nèi)容
>>本文地址:http://liujunjsxg.cn/zhuanye/2020/52923.html
聲明:本站稿件版權(quán)均屬中公教育優(yōu)就業(yè)所有,未經(jīng)許可不得擅自轉(zhuǎn)載。
1 您的年齡
2 您的學(xué)歷
3 您更想做哪個方向的工作?