创建目录
mkdir /home/www/
新建nginx配置
vi /home/server/nginx/host/young.conf
server {
listen 80 default;
index index.php index.html index.htm;
location / {
try_files $url $url / /index.php?$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $request_uri;
include fastcgi_params;
}
access_log off;
error_log off;
}
chown -R nginx:nginx /home/www/