Windows Nginx Virtual Host Building

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.