nginx.conf:

# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;

# Load dynamic modules. See /usr/share/nginx/README.dynamic.
include /usr/share/nginx/modules/*.conf;

events {
worker_connections 1024;
}

http {
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
tcp_nopush on;
#tcp_nodelay on;
types_hash_max_size 2048;
keepalive_timeout 900s;

include /etc/nginx/mime.types;
default_type application/octet-stream;

# Load modular configuration files from the /etc/nginx/conf.d directory.
# See http://nginx.org/en/docs/ngx_core_module.html#include
# for more information.
include /etc/nginx/conf.d/*.conf;

# Settings for a TLS enabled server.
#
# server {
# listen 443 ssl http2 default_server;
# listen [::]:443 ssl http2 default_server;
# server_name _;
# root /usr/share/nginx/html;
#
# ssl_certificate "/etc/pki/nginx/server.crt";
# ssl_certificate_key "/etc/pki/nginx/private/server.key";
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
#
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
#
# location / {
# }
#
# error_page 404 /404.html;
# location = /40x.html {
# }
#
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }

}

cat /etc/nginx/conf.d/superset.conf

server {
listen 80;
# server_name 192.189.142.89;
root /usr/share/nginx/html;

location / {
proxy_pass http://192.189.142.83:6666;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}

/usr/sbin/nginx -t

/usr/sbin/nginx

/usr/sbin/nginx -s reload

简单nginx代理配置的更多相关文章

  1. nginx代理配置 配置中的静态资源配置,root 和 alias的区别。启动注意事项

    这篇主要内容是:nginx代理配置 配置中的静态资源配置,root 和 alias的区别.启动注意事项! 为什么会在window上配置了nginx呢?最近我们的项目是静态资源单独放在一个工程里面,后端 ...

  2. nginx代理配置 配置中的静态资源配置,root 和 alias的区别

    这篇主要内容是:nginx代理配置 配置中的静态资源配置,root 和 alias的区别.启动注意事项! 为什么会在window上配置了nginx呢?最近我们的项目是静态资源单独放在一个工程里面,后端 ...

  3. Nginx代理配置-centos6.10版

    nginx代理配置 cd /etc/nginx/init.d vi default.conf 添加: upstream server1{ server 192.168.125.128:8100 wei ...

  4. 第十四章 nginx代理配置

    一.nginx代理 1.常见模式 1.常见模式:1)正向代理2)反向代理​2.区别1)区别在于形式上服务的"对象"不一样2)正向代理代理的对象是客户端,为客户端服务3)反向代理代理 ...

  5. Centos 6.3 nginx代理配置

    1. 查看nginx所在位置 $ nginx -t /etc/nginx/nginx.conf 2. 配置 user  nobody; #启动服务的用户 worker_processes  ; err ...

  6. springboot+vue前后端分离,nginx代理配置 tomcat 部署war包详细配置

    1.做一个小系统,使用了springboot+vue 基础框架参考这哥们的,直接拿过来用,链接https://github.com/smallsnail-wh/interest 前期的开发环境搭建就不 ...

  7. Nginx 代理配置

    1.反向代理 修改conf\nginx.conf文件, 添加proxy_pass属性 server { listen 7080; #nginx 端口 server_name localhost; #n ...

  8. nginx代理配置备份

    补充: 代理对文件大小的限制, server {client_max_body_size 100M;listen 9096;server_name gate.chaohuoyy.com; locati ...

  9. 【Linux】添加Nginx代理配置只允许内部IP访问

    location / { index index.jsp; proxy_next_upstream http_500 http_502 http_503 http_504 error timeout ...

随机推荐

  1. k8s集群管理注意要点【持续更新】

    1.编写pod yaml文件时绑定调度标签,必须要给指定节点绑定标签,否则无法调度到指定节点上,报错: Events: Type Reason Age From Message ---- ------ ...

  2. 妙味课堂——JavaScript基础课程笔记

    集中时间把秒微课堂JS的基础课程看完,并且认真完成了课后练习.感觉在JS方面的技能算是入了个门了.课后练习的作业完成的代码我都汇总在了这里.至于视频课的学习笔记,则记录如下. 第01课JS入门基础_热 ...

  3. centos6升级系统内核

    1.升级系统内核查看内核版本: uname -r 2.6.32-573.8.1.el6.x86_64 导入elrepo的key: rpm --import https://www.elrepo.org ...

  4. zookeeper系列(七)zookeeper的序列化及通讯协议

    作者:leesf    掌控之中,才会成功:掌控之外,注定失败.原创地址http://www.cnblogs.com/leesf456/p/6091208.html尊重作者原创,奇文共欣赏,大家共同学 ...

  5. git忽略提交:.gitignore

    在使用Git的过程中,我们喜欢有的文件比如日志,临时文件,编译的中间文件等不要提交到代码仓库,这时就要设置相应的忽略规则,来忽略这些文件的提交. Git 忽略文件提交的方法 有三种方法可以实现忽略Gi ...

  6. 设置Chart.js默认显示Point点的值不用鼠标经过才显示

    Chart.js默认的显示方式是鼠标经过Point点的时候才会显示这个点的值,代码如下: var testdata: { periodNum: ["2018121","2 ...

  7. VirtualBox——在Win7的HOST上安装配置虚拟机CentOS7

    在Win7为HOST的环境下,安装VirtualBox,在其中安装CentOS7,以Bridge的方式搭建网络环境. 主要配置包括VirtualBox中的网络设置,以及CentOS中的网络配置.另外还 ...

  8. ccf 201512-3 画图(90)

    ccf 201512-3 画图(90) #include<iostream> #include<cstring> #include<algorithm> using ...

  9. yum 时一直停在Determining fastest mirrors 界面

    [root@fanyk ~]# yum redis Loaded plugins: fastestmirror Determining fastest mirrors 在yum makecache时, ...

  10. jxbrowser java代码直接调用js代码

    https://blog.csdn.net/shuaizai88/article/details/73743669 final Browser browser = new Browser(); Bro ...