cd /sources/ wget http://nginx.org/download/nginx-1.13.5.tar.gz tar -zxf nginx-1.13.5.tar.gz cd nginx-1.13.5 ./configure --prefix=/web/nginx --with-http_ssl_module make && make install
--with-http_ssl_module //打开https
打开nginx.conf
1
vim nginx.conf
支持php。在server里加入
复制代码
1 2 3 4 5 6 7 8
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }