• Nginx反向代理设置 从80端口转向其他端口


    [root@localhost bin]# netstat -lnutp
    Active Internet connections (only servers)
    Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name   
    tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN      1552/nginx          
    tcp        0      0 0.0.0.0:22                  0.0.0.0:*                   LISTEN      1408/sshd           
    tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      1487/master         
    tcp        0      0 ::ffff:127.0.0.1:8005       :::*                        LISTEN      6389/java           
    tcp        0      0 :::8009                     :::*                        LISTEN      6389/java           
    tcp        0      0 :::8080                     :::*                        LISTEN      6389/java           
    tcp        0      0 :::22                       :::*                        LISTEN      1408/sshd           
    tcp        0      0 ::1:25                      :::*                        LISTEN      1487/master         
    udp        0      0 0.0.0.0:68                  0.0.0.0:*                               6042/dhclient       
    [root@localhost bin]# java -version
    java version "1.8.0_45"
    Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
    Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
        server {
            listen       80;
            server_name  localhost;
    
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
                proxy_pass http://127.0.0.1:8080;
                #root   html;
                #index  index.html index.htm;
            }

    网上找的一个配置:

    worker_processes  1;
    
    events {
        worker_connections  1024;
    }
    
    
    http {
        include       mime.types;
        default_type  application/octet-stream;
    
        sendfile        on;
    
        keepalive_timeout  65;
    
    
        server {
            listen       80;
            server_name  127.0.0.1:8080;
    
            location / {
    
                proxy_pass   http://127.0.0.1:8080;
            }
    
        }
    
    }

  • 相关阅读:
    js代码的执行顺序及运算
    javascript讲解
    浏览器的差距
    标准流
    下拉列表
    单位
    滚动标签
    接着说一些有关排版的一些东西
    关于处理浏览器的兼容问题
    关于排版的技巧
  • 原文地址:https://www.cnblogs.com/bass6/p/5948199.html
Copyright © 2020-2023  润新知