修改nginx.conf文件,新增配置項php
server { listen 8083; server_name www.blogsite.com; root /usr/local/var/www/blogsite; index index.php index.htm index.html; location / { try_files $uri $uri/ /index.php; } location /index.php{ fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /usr/local/var/www/blogsite/index.php; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi.conf; } location /domain.php{ fastcgi_pass 127.0.0.1:9000; fastcgi_param SCRIPT_FILENAME /usr/local/var/www/blogsite/domain.php; fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; include fastcgi.conf; } }