==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/pcre-8.45.catalina.bottle.tar.gz ######################################################################## 100.0% ==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/nginx-1.21.1.catalina.bottle.tar.gz ######################################################################## 100.0% ==> Installing dependencies for nginx: pcre ==> Installing nginx dependency: pcre ==> Pouring pcre-8.45.catalina.bottle.tar.gz 🍺 /usr/local/Cellar/pcre/8.45: 204 files, 5.8MB ==> Installing nginx ==> Pouring nginx-1.21.1.catalina.bottle.tar.gz ==> Caveats Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo. nginx will load all files in /usr/local/etc/nginx/servers/. To have launchd start nginx now and restart at login: brew services start nginx Or, if you don't want/need a background service you can just run: nginx ==> Summary 🍺 /usr/local/Cellar/nginx/1.21.1: 25 files, 2.2MB ==> Caveats ==> nginx Docroot is: /usr/local/var/www The default port has been set in /usr/local/etc/nginx/nginx.conf to 8080 so that nginx can run without sudo. nginx will load all files in /usr/local/etc/nginx/servers/. To have launchd start nginx now and restart at login: brew services start nginx Or, if you don't want/need a background service you can just run: nginx
1 命令测试网站服务
curl -Iv ip:port
# 其中-I表示忽略内容,-v显示访问过程