Linux下安装nginx
程序员文章站
2022-03-26 19:34:36
安装前先安装一些依赖库:yum install opensslyum install openssl-develyum install pcreyum install pcre-develyum install zlibyum install zlib-devel安装:输入:wgethttp://tengine.taobao.org/download/tengine-2.3.2.tar.gztar xvf tengine-2.3.2.tar.gzcd tengi....
安装前先安装一些依赖库:
yum install openssl
yum install openssl-devel
yum install pcre
yum install pcre-devel
yum install zlib
yum install zlib-devel
安装:
输入:
wget http://tengine.taobao.org/download/tengine-2.3.2.tar.gz
tar xvf tengine-2.3.2.tar.gz
cd tengine-2.3.2
./configure --prefix=/usr/local/software/tengine --add-module=./modules/ngx_http_upstream_check_module
make
make install
配置nginx:
注意,反向代理配置的地方(location/)增加两行:
proxy_cookie_path / "/; httponly; secure; SameSite=Lax";
add_header X-Frame-Options SAMEORIGIN;
注意如果需要配置conf.d文件需要在nginx.conf中配置:
include /usr/local/software/tengine/conf/conf.d/*.conf;
本文地址:https://blog.csdn.net/dreamwei888/article/details/107383262
推荐阅读
-
Windows下通过MySQL Installer安装MySQL服务的教程图解
-
Linux下Docker CE使用从包中安装的方式详解
-
Windows10下安装Docker的步骤图文教程
-
图文详解WinPE下安装Python
-
Win7下搭建python开发环境图文教程(安装Python、pip、解释器)
-
在Linux系统上通过uWSGI配置Nginx+Python环境的教程
-
Windows系统下使用flup搭建Nginx和Python环境的方法
-
Linux下将Python的Django项目部署到Apache服务器
-
Linux下python与C++使用dlib实现人脸检测
-
Windows下安装python2.7及科学计算套装