首页 > 系统相关 >CTOS NGINX绑定域名转发到DOCKER

CTOS NGINX绑定域名转发到DOCKER

时间:2023-01-09 18:39:59浏览次数:39  
标签:index location server NGINX html proxy DOCKER listen CTOS


server {
listen 80 default_server;
listen [::]:80 default_server;

# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self signed certs generated by the ssl-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;

root /var/www/html;

# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html;

server_name _;

location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# include snippets/fastcgi-php.conf;
#
# # With php7.0-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php7.0-fpm:
# fastcgi_pass unix:/run/php/php7.0-fpm.sock;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}


# Virtual Host configuration for example.com
#
# You can move that to a different file under sites-available/ and symlink that
# to sites-enabled/ to enable it.
#http://xa.station.test.funenc.com/qr_login
server {
listen 80;
server_name cl1024.com;
index index.jsp index.html index.html index.shtml;
location / {
proxy_pass http://127.0.0.1:101;
#Proxy Settings;
#proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

 

标签:index,location,server,NGINX,html,proxy,DOCKER,listen,CTOS
From: https://blog.51cto.com/u_14650780/5998657

相关文章

  • NGINX基本编译安装和配置绑定域名或者默认路径页面
    tar-xvfnginx-1.21.4.tar.gzlscdnginx-1.21.4lsyum-yinstallpcrepcre-develyum-yinstallopenssl-devel#也可以去掉-add-module的东西./configure--user=nginx-......
  • nginx用TCP转发HTTP
    stream{upstreamsocket_proxy{hash$remote_addrconsistent;server127.0.0.1:80weight=5max_fails=3fail_timeout=120s;}server{......
  • nginx_扩容提升吞吐量
    扩容方式单机垂直扩容:硬件资源增加水平扩展:集群化细粒度拆分:分布式 1.数据分区 2.上游服务SOA化 3.入口细分 1.浏览器 2.移动端原生App 3.H5内嵌式应用 4.数......
  • docker部署es集群
      1.服务器192.168.1.240es1192.168.1.125es2192.168.1.141es32.es镜像自行下载3.es配置文件#es1[root@wx-host-0029config]#catelasticsearch.yml#......
  • Docker构建镜像时,报错:manifest for java:8-jdk-alpine not found: manifest unknown
     今天在用Docker构建镜像时,突然提示构建失败,错误信息如下:错误:manifestforjava:8notfound:manifestunknown:manifestunknown 经查原来是Docker官网弃用了Java......
  • [VueJsDev] 日志 - nginxConfig 配置文件备份
    [VueJsDev]目录列表https://www.cnblogs.com/pengchenggang/p/17037320.htmlnginxConfig配置文件备份:::details目录目录nginxConfig配置文件备份Step.1:服务器......
  • Zabbix使用LLD自动发现规则发现监控docker容器(下)
    本篇是使用Zabbix监控docker容器下篇。利用ZABBIX自动发现监控功能,在部署zabbixagent客户端的服务器上,编写自定义功能脚本,实现自动获取服务器上运行的docker服务并监控其运......
  • Nginx多级反向代理下的IP透传
    透传IP为何要做透传IP在使用了CDN做加速站点静态资源加速后,当用户请求的静态资源没能命中,此时CDN会到源站请求内容,那么此时访问源站的IP为CDN节点的IP,不仅如此,可能经我们......
  • nginx 配置443 域名
    1申请域名(公有云)2下载证书pemkey并上传服务器指定目录3公有云上做A记录解析(解析到代理的nginx)4nginx配置443模块配置内容:server{listen80;......
  • Docker搭建LNMP+wordpress
    一、项目模拟1.项目环境公司在实际的生产环境中,需要使用Docker技术在一台主机上创建LNMP服务并运行Wordpress网站平台。然后对此服务进行相关的性能调优和管理工......