CentOS 7.3 下 安装LNMP(Nginx1.10+MySQL5.7+PHP7.0.20)(3)

php安装完成

五、nginx站点配置 // 创建配置文件 # vim /etc/nginx/conf.d/yourWebAddress.com.conf >> 写入内容 server { listen 80; server_name www.yourWebAddress.com; #charset koi8-r; #access_log /var/log/nginx/log/host.access.log main; location / { root /var/www/html; index index.php index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root /var/www/html; } # proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ \.php$ { # proxy_pass ; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/html/$fastcgi_script_name; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /\.ht { # deny all; #} } >> 写入内容结束

最近总是要安装服务器环境,记录这次CentOS 7.3下安装LNMP(Nginx1.10+MySQL5.7+PHP7.0.20)环境的过程,以备日后使用。

LNMP环境搭建(Discuz论坛) 

Ubuntu 14.04下apt-get方法安装LNMP环境 

CentOS 7源码编译安装PHP5.6和Nginx1.7.9及MySQL(搭建LNMP环境)

Ubuntu 14.04 LTS 安装 LNMP Nginx\PHP5 (PHP-FPM)\MySQL 

CentOS 6.8 编译安装LNMP 简述 

Ubuntu 16.04 下源码配置LNMP开发环境

CentOS 7源码编译安装PHP5.6和Nginx1.7.9及MySQL(搭建LNMP环境)

CentOS 7源码安装最新版LNMP环境

CentOS 6.8 安装LNMP环境(Linux+Nginx+MySQL+PHP)   

Ubuntu系统下LNMP环境的搭建 

编译LNMP之Nginx+php-fpm 

Ubuntu 16.04 LTS下LNMP环境配置简述 

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/7d2b83cfe7d1e3c10ac0774f37a7ba10.html