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)环境的过程,以备日后使用。
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 7源码编译安装PHP5.6和Nginx1.7.9及MySQL(搭建LNMP环境)