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

推荐订阅源

L
LangChain Blog
博客园 - 司徒正美
美团技术团队
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
人人都是产品经理
人人都是产品经理
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
T
Troy Hunt's Blog
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
云风的 BLOG
云风的 BLOG
Engineering at Meta
Engineering at Meta
Cisco Talos Blog
Cisco Talos Blog
T
Tor Project blog
B
Blog
NISL@THU
NISL@THU
月光博客
月光博客
博客园 - 【当耐特】
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
腾讯CDC
L
Lohrmann on Cybersecurity
The Cloudflare Blog
L
LINUX DO - 最新话题
S
Security @ Cisco Blogs
S
Secure Thoughts
Spread Privacy
Spread Privacy
有赞技术团队
有赞技术团队
The Last Watchdog
The Last Watchdog
Project Zero
Project Zero
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Vercel News
Vercel News
H
Hacker News: Front Page
S
SegmentFault 最新的问题
Schneier on Security
Schneier on Security
aimingoo的专栏
aimingoo的专栏
P
Privacy & Cybersecurity Law Blog
博客园 - 三生石上(FineUI控件)
Forbes - Security
Forbes - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
T
Tailwind CSS Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
G
GRAHAM CLULEY
W
WeLiveSecurity
小众软件
小众软件
Recorded Future
Recorded Future
Cyberwarzone
Cyberwarzone
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org

博客园 - 接云网络

.Net5开发MQTT服务器 使用Docker搭建MQTT服务器 使用Docker搭建MQTT服务器 在Raspberry Pi上安装Docker 阿里云=>RHSA-2019:1884-中危: libssh2 安全更新 MediaAPIController CentOS7 mysql支持中文 设置centos7中的mysql5.7不区分表名大小写有关操作 CentOS7 安装mysql(YUM源方式) centos7下安装nginx CentOS7利用systemctl添加dotnet后台服务 CentOS7利用systemctl添加自定义系统服务 mysql 8.0.13开启远程连接 配置方式 vue 父子组件数据的双向绑定大法 .NET Core 3.0 发布单文件可执行程序 asp.net core In Docker(Image) ASP.NET Core 2.1 使用Docker运行 postman 发送json请求 Simple ASP.NET CORE 2.2 App +Vue JS
Debian 8 安装Nginx最新版本
接云网络 · 2019-09-20 · via 博客园 - 接云网络

在Debian下如果直接apt-get install nginx直接装发现nginx版本是很旧的,本文主要讲一下如何在Debian 8上装新版的nginx。

原文资料:https://nginx.org/en/linux_packages.html,如果英文不错的话,可以直接阅读官方文档。

一、清理残余的旧版本

sudo apt-get remove nginx nginx-common nginx-full

二、安装nginx PGP签名文件

wget http://nginx.org/keys/nginx_signing.key
sudo apt-key add nginx_signing.key

三、使用sudo修改source源

codename参数根据os来选择:https://nginx.org/en/linux_packages.html#distributions

比如我的OS是Debian 8 jessie,codename参数即为jessie

使用sudo编辑/etc/apt/source.list文件

sudo vim /etc/apt/source.list

在文件末追加以下:

deb http://nginx.org/packages/mainline/debian/ [codename] nginx
deb-src http://nginx.org/packages/mainline/debian/ [codename] nginx

eg:

deb http://nginx.org/packages/mainline/debian/ jessie nginx
deb-src http://nginx.org/packages/mainline/debian/ jessie nginx

四、更新软件源并安装nginx

sudo apt-get update
sudo apt-get install nginx

五、查看nginx版本号

六、nginx启动

sudo service nginx start
sudo service nginx restart
sudo service nginx reload
sudo service nginx stop

七.配置

vim /etc/nginx/sites-available/default
 server{
        listen 80;
	access_log  logs/www.***.cn.log  main;
        server_name www.***.cn; #绑定域名
        location / {
            proxy_pass  http://localhost:7777;
	    proxy_set_header Host $host;
	    proxy_set_header X-Real-IP $remote_addr;
	    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }
    }