Configuration
設定檔 nginx.conf
nginx -t
# nginx: the configuration file /usr/local/etc/nginx/nginx.conf syntax is ok
# nginx: configuration file /usr/local/etc/nginx/nginx.conf test is successful
# 表示設定檔路徑為 /usr/local/etc/nginx/nginx.conf
# listen 是個 simple directive
# 對 server 這個 block directive 作設定
# 指定它監聽 port 80
server {
listen 80;
}http {
# server 一定在 http 裡面
server {
# location 一定在 server 裡面
location {
}
}
}
event {}設定 proxy server
設定 load balancer
Last updated