首页天道酬勤nginx本地IP无法访问,防火墙转换nginx虚拟IP失败

nginx本地IP无法访问,防火墙转换nginx虚拟IP失败

张世龙 05-12 18:48 131次浏览

nginx的基本配置

#启动用户#用户nobody; 工作器_ processes 1; error_log logs/error.log; #error_log logs/error.log notice; #error_log logs/error.log info; #pid logs/nginx.pid; 事件{ worker _ connections 1024; }http { include mime.types; efault _ type应用程序/octet-stream; # log _ format main ' $ remote _ addr-$ remote _ user [ $ time _ local ] ' $ request ' # ' $ status $ body _ $ $ #访问日志打印access_log logs/access.log; sendfile on; #tcp_nopush on; #keepalive_timeout 0; keepalive_timeout 65; #gzip on; #反向代理服务器{ #监听端口listen 81; # nginx server地址,如果绑定域名,则为域名server_name 100.100.100.100; #代理设置location/{ #传输超时时间设置单位:秒proxy_read_timeout 10; #转发地址proxy _ pass http://100.200.300.40033608090; }服务器{ listen 80; server_name localhost; #charset koi8-r; # access _ loglogs/host.access.log main; #静态服务器位置/{ root html; 索引索引. html index.htm; } #error_page 404 /404.html; }} linux防火墙的常见操作

#防火墙systemctl start firewalld#查看关闭防火墙systemctl stop firewalld#的端口开放情况firewall-cmd --list-ports# 打开特定端口的firewall-cmd-zone=TCP-- permanent #关闭特定端口firewall-cmd-- remove-port=80/TCP-- permanent #并更改配置

分数加减法怎么算,freemarker常用标签 防火墙NAT后nginx无法访问,nginx关闭默认页面