mirror of
https://shylinux.com/x/ContextOS
synced 2025-04-25 16:58:06 +08:00
904 B
904 B
简介
Nginx 是一个异步框架的Web服务器,也可以用作反向代理,负载均衡和HTTP缓存。
源码安装
$ wget http://nginx.org/download/nginx-1.15.2.tar.gz
$ tar xzf nginx-1.15.2.tar.gz
$ cd nginx-1.15.2
$ ./configure
$ make
$ sudo make install
$ sudo nginx
$ curl localhost
...
基本配置
http {
server {
listen 80;
server_name localhost;
location / {
root html;
index index.html index.htm;
}
location /proxy {
proxy_pass http://localhost:9094;
}
}
}