内部资源公网访问反向代理+实施方案.docVIP

  • 7
  • 0
  • 约5.02千字
  • 约 7页
  • 2018-01-04 发布于河南
  • 举报

内部资源公网访问反向代理+实施方案.doc

内部资源公网访问反向代理实施方案

公司内部资源公网访问反向代理实施方案 目 录 1 方案目标 1 2 操作步骤 1 2.1 编译pcre 1 2.2 编译NGINX 2 2.3 创建 Nginx 日志目录 2 2.4 创建 Nginx 配置文件 2 2.5 创建Nginx 配置启动脚本 4 2.6 给NGINX 启动脚本执行权限 6 2.7 把 nginx 加入到启动服务中 6 2.8 启动 Nginx 6 3 生成nginx认证文件 6 4 网关映射.9的9999端口 7 5 登录测试 7 方案目标 公司内部的WIKI,工时系统等等是公司的宝贵资料,不适合完全在互联网上公开,在.9服务器上安装nginx作反向代理,并实现用户认证登录。 操作步骤 编译pcre wget /soft/linux/nginx_php/pcre/pcre-8.01.tar.gz tar zxvf pcre-8.01.tar.gz cd pcre-8.01/ ./configure make make install cd ../ 编译NGINX wget /soft/linux/nginx_php/nginx/nginx-0.8.34.tar.gz tar zxvf nginx-0.8.34.tar.gz cd nginx-0.8.34/ ./configure --user=sharera--group=sharera --prefix=/usr/local/nginx --with-http_stub_status_module --with-http_ssl_module make make install cd ../ 创建 Nginx 日志目录 mkdir -p /home/sharera/logs chmod +w /home/sharera/logs chown -R sharera:sharera /home/sharera/logs 创建 Nginx 配置文件 cp /usr/local/nginx/conf/nginx.conf /usr/local/nginx/conf/nginx.conf.bak echo “” /usr/local/nginx/conf/nginx.conf vi /usr/local/nginx/conf/nginx.conf 输入: user sharera sharera; worker_processes 2; error_log /home/sharera/logs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 1024; events { use epoll; worker_connections 1024; } http { include mime.types; default_type application/octet-stream; #charset gb2312; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 8m; sendfile on; tcp_nopush on; keepalive_timeout 200; tcp_nodelay on; fastcgi_connect_timeout 300; fastcgi_send_timeout 300; fastcgi_read_timeout 300; fastcgi_buffer_size 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 128k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.0; gzip_comp_level 2; gzip_types text/plain application/x-javascript text/css application/xml; gzip_vary on; #limit_zone crawler $binary_remote_addr 10m; server { listen 80; server_na

文档评论(0)

1亿VIP精品文档

相关文档