Mac 설치 openresty

932 단어
1. 환경 homebrew 1.3.1
hombrew 의 기본 경 로 는 / usr / local / opt 입 니 다.
1.step
brew update
2.step
brew install pcre openssl
3.step
brew install homebrew/nginx/openresty
4.step
brew tap homebrew/nginx
5.step
brew install homebrew/nginx/openresty
6.step
PATH=/usr/local/opt/openresty/nginx/sbin:$PATH
7.step
export PATH
Hello world
mkdir ~/work
cd ~/work
mkdir logs/ conf/


프로필 생 성
worker_processes  1;        #nginx worker   
error_log logs/error.log;   #          
events {
    worker_connections 1024;
}

http {
    server {
        listen 6767;
        location / {
            default_type text/html;
            content_by_lua {
                ngx.say("HelloWorld")
            }
        }
    }
}
nginx -p `pwd`/ -c conf/nginx.conf
curl  127.0.0.1:6767
hello world

좋은 웹페이지 즐겨찾기