openresty 编译安装(ubuntu)
openresty 编译安装(ubuntu)
1. 下载源码:
https://mirrors.huaweicloud.com/openresty/v1.19.3.1rc0/openresty-1.19.3.1rc0.tar.gz
2. 解压
tar -xvzf openresty-1.19.3.1rc0.tar.gz
cd openresty-1.19.3.1rc0
3. 编译安装(注意prefix位置自行确定)
./configure --prefix=/opt/openresty --with-luajit
make -j4
make install
备注:
configure过程可能提示缺少一些编译依赖,根据需要自行安装;
sudo apt-get install libssl-dev
sudo apt install zlib1g-dev
sudo apt-get install libpcre3 libpcre3-dev
参考:
https://www.cnblogs.com/freeweb/p/13446663.html
nginx sub-filter选项不生效的问题
注意需要使用--with-http_sub_module选项开启sub-filter支持
问题在于如果响应是gzip的形式的时候,sub-filter无法完成替换,一般可以通过添加proxy_set_header Accept-Encoding '';解决
location /jenkins/ {
proxy_pass http://jenkins.xxx/;
proxy_redirect off;
proxy_hide_header 'x-frame-options';
proxy_set_header Accept-Encoding '';
sub_filter 'src="/' 'src="';
sub_filter 'href="/' 'href="';
sub_filter_once off;
add_header Access-Control-Allow-Origin *;
add_header Access-Control-Allow-Methods 'GET,POST,OPTIONS,PUT,DELETE,PATCH';
add_header Access-Control-Allow-Headers 'Authorization,Access-Control-Allow-Headers, Origin,Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers';
}
参考:
https://stackoverflow.com/questions/31893211/http-sub-module-sub-filter-of-nginx-and-reverse-proxy-not-working
https://www.cnblogs.com/zhang90030/p/8417685.html
https://blog.csdn.net/u013605060/article/details/114012201
https://bbs.csdn.net/topics/391965642
nginx反向代理移除X-Frame-Options SAMEORIGIN头限制
proxy_hide_header 'x-frame-options';
docker导出镜像到本地文件以及从本地文件中加载镜像
docker save -o <path for generated tar file> <image name>
从本地文件加载的命令形式
docker load -i <path to image tar file>
导出的命令形式:
docker save -o c:/myfile.tar centos:16
参考:
https://stackoverflow.com/questions/23935141/how-to-copy-docker-images-from-one-host-to-another-without-using-a-repository
golang设置goproxy的命令形式
go env -w GOPROXY=https://goproxy.cn
印象中的export GOPROXY=xx不生效了
参考:
https://www.cnblogs.com/wt645631686/p/13405161.html
- 点赞
- 收藏
- 关注作者
评论(0)