You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
620 B
39 lines
620 B
1 year ago
|
= nginx
|
||
|
== 安装
|
||
|
[source,bash]
|
||
|
----
|
||
|
# 安装
|
||
|
brew install nginx
|
||
|
|
||
|
# 启动
|
||
|
brew services start nginx
|
||
|
----
|
||
|
|
||
|
== 配置
|
||
|
./opt/homebrew/etc/nginx/nginx.conf
|
||
|
[source,bash]
|
||
|
----
|
||
|
# 反向代理服务
|
||
|
server {
|
||
|
listen 8888;
|
||
|
server_name localhost;
|
||
|
location / {
|
||
|
proxy_pass http://idea.lanyus.com;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
server {
|
||
|
listen 80;
|
||
|
server_name localhost;
|
||
|
charset utf-8;
|
||
|
|
||
|
location / {
|
||
|
root /Users/wangshaoping/wspsc/software/webserver/www;
|
||
|
autoindex on;
|
||
|
autoindex_exact_size off;
|
||
|
autoindex_localtime on;
|
||
|
index index.html index.htm;
|
||
|
}
|
||
|
}
|
||
|
----
|