专注于 JetBrains IDEA 全家桶,永久激活,教程
持续更新 PyCharm,IDEA,WebStorm,PhpStorm,DataGrip,RubyMine,CLion,AppCode 永久激活教程

nginx1.15安装和配置

安装单机版nginx 首先下载安装包 nginx-1.15.0.tar.gz pcre-8.38.tar.gz 首先安装pcre

# tar zxvf pcre-8.38.tar.gz
# cd pcre-8.38
# ./configure --prefix=/home/tsaip/csss/pcre
# make
# make install

我的目录是:/home/tsaip/csss/pcre 执行完以后开始安装nginx

cd nginx-1.15.0
#修改配置
./configure --prefix=/home/tsaip/csss/nginx  --with-pcre=../pcre-8.38

make && make install

执行完毕后nginx目录下出现相关文件夹sbin nginx启动 cd nginx/sbin

./nginx

如果没有root权限则将端口号80修改为大于1024的端口才能启动 配置文件

cd conf
vim nginx.conf
listen 7777

修改配置文件 nginx.conf

http {
#自定义配置文件开始
upstream tomcat_service{
 server 192.168.0.1:8080 weight=1;
 server 192.168.0.2 :8080 weight=1;
 server  192.168.0.3:8080 weight=1;
 }
    #自定义配置文件结束
    server {
        listen       8000;
        server_name  localhost;
        location / {
       # 自定义配置文件开始
           proxy_pass http://tomcat_service;
        proxy_set_header   Host             $host:8000;
        proxy_set_header   X-Real-IP        $remote_addr;
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
         #自定义配置文件结束
        }
    }

文章永久链接:https://tech.souyunku.com/29614

未经允许不得转载:搜云库技术团队 » nginx1.15安装和配置

JetBrains 全家桶,激活、破解、教程

提供 JetBrains 全家桶激活码、注册码、破解补丁下载及详细激活教程,支持 IntelliJ IDEA、PyCharm、WebStorm 等工具的永久激活。无论是破解教程,还是最新激活码,均可免费获得,帮助开发者解决常见激活问题,确保轻松破解并快速使用 JetBrains 软件。获取免费的破解补丁和激活码,快速解决激活难题,全面覆盖 2024/2025 版本!

联系我们联系我们