Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
zhangjie edited this page Oct 13, 2020 · 2 revisions
  1. 下载nginx的tar包
  2. 配置:./configure --prefix=/home/baseuser/nginx --with-http_ssl_module --with-pcre=../pcre-8.43 --with-zlib=../zlib-1.2.11
    2.1 下载pcre: wget https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz
    2.2 下载zlib gzip压缩模块: wget http://nginx.org/download/nginx-1.17.1.tar.gz
    -->分别进行解压
  3. make
  4. 进入/home/baseuser/nginx/sbin目录,执行nginx -v

设置简单的代理服务器

  1. 语法:proxy_pass URL;
    location /name/ {
     proxy_pass http://127.0.0.1/remote/;
     }
    
  2. 修改配置文件后重新加载: nginx -s reload

遇到的问题

  1. session失效
    1.1 尝试的解决方案(待解决)
    (1) 语法 proxy_cookie_path path replacement;
    (2) 语法 proxy_set_header field value;

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /