惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
WordPress大学
WordPress大学
aimingoo的专栏
aimingoo的专栏
博客园 - 聂微东
M
MIT News - Artificial intelligence
Microsoft Security Blog
Microsoft Security Blog
云风的 BLOG
云风的 BLOG
Google DeepMind News
Google DeepMind News
Apple Machine Learning Research
Apple Machine Learning Research
H
Hackread – Cybersecurity News, Data Breaches, AI and More
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
O
OpenAI News
N
News and Events Feed by Topic
TaoSecurity Blog
TaoSecurity Blog
有赞技术团队
有赞技术团队
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Hacker News: Ask HN
Hacker News: Ask HN
Help Net Security
Help Net Security
爱范儿
爱范儿
W
WeLiveSecurity
V2EX - 技术
V2EX - 技术
Forbes - Security
Forbes - Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
SecWiki News
SecWiki News
A
About on SuperTechFans
Cloudbric
Cloudbric
N
Netflix TechBlog - Medium
博客园 - 司徒正美
S
Security @ Cisco Blogs
Martin Fowler
Martin Fowler
Schneier on Security
Schneier on Security
I
InfoQ
Engineering at Meta
Engineering at Meta
Google Online Security Blog
Google Online Security Blog
T
Troy Hunt's Blog
Latest news
Latest news
N
News and Events Feed by Topic
Security Archives - TechRepublic
Security Archives - TechRepublic
Spread Privacy
Spread Privacy
NISL@THU
NISL@THU
B
Blog
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
V
V2EX
J
Java Code Geeks
N
News | PayPal Newsroom
T
Tor Project blog
The GitHub Blog
The GitHub Blog

博客园 - surfsky

用阿里的 sketch 插件 FusionDesign 来快速设计中后台 用 Sketch 设计和输出响应式网页 百度、高德、腾讯、天地图、谷歌、必应瓦片图地图切图工具 MapCutter(旧名 MapTiler),支持超大图、高清切片、webgl、leaflet、maptalk、openlayers、cesium netcore 下的 Javascript 表达式求值 netcore 下的 C# 表达式求值 中标麒麟安装SQLServer 中标麒麟上开启MySql Color Schema 配色随笔 .Net与 WebAssembly 随笔 关于Xamarin、Qml、数据绑定、MVC、MVVM 相关的散讲 用Nuget部署程序包 Qt3D Qt3D Shader Qt QML 2D shader LearnOpenGL Qt3D 5.9 and future FineUI 相关 EntityFramwork 七七八八 Qt qml 单例模式
在 MAC 下配置 Nginx
surfsky · 2020-04-15 · via 博客园 - surfsky

1. 更新Homebrew

# mac使用brew update无反应,更新慢解决办法
# 替换brew.git
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git

# 替换homebrew-core.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git

# update
brew update

2. 安装 nginx

==> Installing dependencies for nginx: openssl@1.1 and pcre

==> Installing nginx dependency: openssl@1.1

==> Downloading https://mirrors.ustc.edu.cn/homebrew-bottles/bottles/openssl@1.1

blablablabla....

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

3. 启动Nginx

登录时作为服务启动: brew services start nginx
直接启动: nginx
默认地址:http://localhost:8080

4. 部署新网站

修改文件 /usr/local/etc/nginx/nginx.conf,可用 sudo pico /usr/local/etc/nginx/nginx.conf,或者直接用记事本编辑。

    # 配置网站
    server {
        listen 8081;
        server_name   localhost;
        location / {
            root     /XXX/DemoSite;
            index    index.html;
        }
    }

重新启动nginx

 打开浏览器查看: