日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

http通道连接mysql_通过http tunnel连接mysql

發(fā)布時間:2025/3/15 数据库 33 豆豆
生活随笔 收集整理的這篇文章主要介紹了 http通道连接mysql_通过http tunnel连接mysql 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

在/etc/nginx/nginx.conf的第一行加上

load_module /usr/lib64/nginx/modules/ngx_http_proxy_connect_module.so;

nginx -s reload

> ```nginx: [emerg] dlopen() "/usr/lib64/nginx/modules/ngx_http_proxy_connect_module.so" failed (/usr/lib64/nginx/modules/ngx_http_proxy_connect_module.so: cannot open shared object file: No such file or directory) in /etc/nginx/nginx.conf```

又要開始折騰了, 沒有ngx_http_proxy_connect_module, google了一把, ngx_http_proxy_connect_module

相當(dāng)于重新編譯nginx, 有幾個坑, 不過意外發(fā)現(xiàn)有個go的開源庫,專門編譯nginx,剛好我是go開發(fā),go的庫nginx-build, 但是下面說的跟這個庫沒關(guān)系, 只是打個go的廣告^_^

(1) 選定對應(yīng)的nginx源碼zip,更改nginx的version, nginx -v

(2) ./configure的編譯參數(shù), 需要提前nginx -V復(fù)制之前的啟動參數(shù)下來

(3) 執(zhí)行path的時候需要看`https://github.com/chobits/ngx_http_proxy_connect_module`的說明,哪個版本用哪個patch

$ git clone https://github.com/chobits/ngx_http_proxy_connect_module.git /root/ngx_http_proxy_connect_module

$ wget http://nginx.org/download/nginx-1.12.2.tar.gz

$ tar -xzvf nginx-1.12.2.tar.gz

$ cd nginx-1.12.2/

$ patch -p1 < /root/ngx_http_proxy_connect_module/patch/proxy_connect.patch

$ ./configure --add-module=/root/ngx_http_proxy_connect_module ·后面接上nginx -V里面的configure arguments·

$ make && make install

$ cp /root/ngx_http_proxy_connect_module

執(zhí)行過程

$ ./configure --add-dynamic-module=/root/ngx_http_proxy_connect_module --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_auth_request_module --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'

出現(xiàn)各種錯誤,各種google,最終

yum -y install redhat-rpm-config.noarch

yum -y install libxslt-devel

yum -y install perl-devel perl-ExtUtils-Embed

yum -y install gd-devel

yum -y install geoip-devel

yum -y install gperftools-devel

最后編譯只出現(xiàn)warning類的報錯才算成功

+ using system PCRE library

+ using system OpenSSL library

+ using system zlib library

nginx path prefix: "/usr/share/nginx"

nginx binary file: "/usr/sbin/nginx"

nginx modules path: "/usr/lib64/nginx/modules"

nginx configuration prefix: "/etc/nginx"

nginx configuration file: "/etc/nginx/nginx.conf"

nginx pid file: "/run/nginx.pid"

nginx error log file: "/var/log/nginx/error.log"

nginx http access log file: "/var/log/nginx/access.log"

nginx http client request body temporary files: "/var/lib/nginx/tmp/client_body"

nginx http proxy temporary files: "/var/lib/nginx/tmp/proxy"

nginx http fastcgi temporary files: "/var/lib/nginx/tmp/fastcgi"

nginx http uwsgi temporary files: "/var/lib/nginx/tmp/uwsgi"

nginx http scgi temporary files: "/var/lib/nginx/tmp/scgi"

./configure: warning: the "--with-ipv6" option is deprecated

ls /usr/lib64/nginx/modules 就會發(fā)現(xiàn)ngx_http_proxy_connect_module.so文件已經(jīng)生成了, /usr/lib64/nginx/modules是modules路徑, nginx -V可以看到–modules-path

開始配置nginx

stream {

server {

listen 443;

server_name t1.test.example.com;

proxy_connect;

proxy_connect_allow 443;

proxy_connect_connect_timeout 10s;

proxy_connect_read_timeout 10s;

proxy_connect_send_timeout 10s;

proxy_pass http://$http_host;

}

}

尷尬的發(fā)現(xiàn)到這里又做下不去了,只能轉(zhuǎn)發(fā)http的流量,無法利用http的tunnel改為tcp流量,到此結(jié)束

總結(jié)

以上是生活随笔為你收集整理的http通道连接mysql_通过http tunnel连接mysql的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 成人另类小说 | 91蝌蚪网 | 521a人成v香蕉网站 | 免费一区二区三区视频在线 | 女人17片毛片60分钟 | 久久涩综合| 自拍啪啪| 国产一级片在线播放 | 亚洲第一页中文字幕 | 美女中文字幕 | 国产日韩不卡 | 伊人精品| 中文字幕在线亚洲 | 黄色片网站免费看 | 久久综合婷婷国产二区高清 | 夜夜春很很躁夜夜躁 | 国产亚洲精品久久久久久 | 欧美丰满老妇 | 1024手机看片日韩 | 亚洲欧美制服丝袜 | 韩国激情呻吟揉捏胸视频 | 探花国产在线 | 操出白浆视频 | 一级丰满大乳hd高清 | 3d动漫精品啪啪一区二区下载 | 国产强被迫伦姧在线观看无码 | 中文字幕人妻色偷偷久久 | 黑人操日本女人 | 天天成人 | 亚洲综合久久网 | 国产91熟女高潮一区二区 | 99re在线精品 | 青青在线免费观看 | 欧美视频一区二区在线观看 | 日本在线高清 | 少妇欧美激情一区二区三区 | 黄色av免费在线播放 | 国产亚洲一区二区三区四区 | 免费一级黄色 | 97偷拍视频| 久久福利一区 | 国产精品久久久久久影视 | 在线免费观看你懂的 | 欧美一区二区免费电影 | 婷婷六月天 | 久久久噜噜噜www成人网 | 夜夜干天天操 | 欧美日韩18 | 国产美女久久久 | 日韩aⅴ片 | 亚洲午夜伦理 | 亚洲av成人无码久久精品老人 | 国产精品野外户外 | www夜插内射视频网站 | 国产18在线 | 欧美福利视频在线观看 | 精品第一页 | 青青草华人在线视频 | 欧美高清视频一区二区三区 | 天堂在线精品视频 | 91精品人妻一区二区三区蜜桃欧美 | 神马影院午夜伦理 | 免费在线观看www | 国产激情视频在线播放 | 亚洲一区二区三区国产 | 亚洲人妻电影一区 | 美女视频久久久 | 国产精品久久无码一三区 | 一区二区免费在线观看视频 | 一级片www | 影音先锋伦理片 | 成人免费毛片aaaaaa片 | 日本三级中国三级99人妇网站 | 国产永久免费 | 高清无打码 | 在线免费播放av | 一区二区三区久久久 | 亚洲三级视频在线观看 | 少妇性高潮视频 | 一区二区在线免费视频 | 成人黄色三级 | 夜夜摸夜夜操 | 成人在线观看一区二区三区 | 人妻射精一区二区 | 黄色国产视频 | 小视频国产 | 精品一区二区在线观看 | 久久久久久久一区二区三区 | 日本做爰三级床戏 | 日韩天堂网 | 国产女人叫床高潮大片免费 | 国产手机看片 | 日韩在线视频免费看 | 漂亮人妻被黑人久久精品 | 朝鲜女人性猛交 | 午夜一区二区三区四区 | 91丝袜呻吟高潮美腿白嫩在线观看 | 欧洲性猛交 | 香蕉视频网站在线 |