Need to introduce the file you just configured in nginx.conf the first step of adding something to the HTTP node inside plusBe sure to note that: Must be
; EndInclude d:/phpen/nginx-1.3.6/conf/vhost/www.light.com.conf; or include d:/phpen/nginx-1.3.6/conf/vhost/*.conf; Second Step write configuration file
I've tested both of these methods.
- You can create a single file for each one this is easy to manage
- You can also write all of them to the same file this is easy to write, hehe
Create a separate file under Conf vhost the contents of the www.light.com.conf are
; End of server {listen ; server_name www.light.com ; index index.html index.htm index.php ; Root D:/phpen/apache/htdocs/light; #需要为每个单独的站点配置一个解析php的东西哦
#下面的location这个名字不能变哦 Location ~ \.php$ { Root D:/phpen/apache/htdocs/light; Fastcgi_pass127.0.0.1:9000; Fastcgi_index index.php; #fastcgi_param Script_filename/scripts$fastcgi_script_name; fastcgi_param script_filename $document _root$fastcgi_script_name; include Fastcgi_params; }}
Step three restart Nginx
; can't start,
If the boot is not, that is where the configuration of the error, you can check the error OH