Nginx 在Windows下搭建靜態Web服務

簡介

nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev. For a long time, it has been running on many heavily loaded Russian sites including Yandex, Mail.Ru, VK, and Rambler. According to Netcraft, nginx served or proxied 23.76% busiest sites in March 2018. Here are some of the success stories: Dropbox, Netflix, Wordpress.com, FastMail.FM. html

 

下載

參考 http://nginx.org/en/download.html nginx

 

安裝

直接解壓到程序目錄。 web

 

命令

    啓動 ui

    $ ngnix spa

    中止 server

    $ ngnix –s stop htm

    $ ngnix –s quit blog

 

配置

參考部分代碼: get

server { it

listen 8000;

server_name localhost;

 

location / {

root C:/web/aaa;

index index.html index.htm;

}

}

 

server {

listen 8001;

server_name localhost;

 

location / {

root C:/web/bbb;

index index.html index.htm;

}

}

相關文章
相關標籤/搜索