Zabbix5.0 初始化后访问Nginx时报404
原因
- nginx默认使用/etc/opt/rh/rh-nginx116/nginx/nginx.conf然后才会使用/etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf,如果使用默认80端口访问是显示nginx默认欢迎页,需要使用域名访问,无法跳转至zabbix页面
解决办法
[root@boy ~]
user nginx;
worker_processes auto;
error_log /var/opt/rh/rh-nginx116/log/nginx/error.log;
pid /var/opt/rh/rh-nginx116/run/nginx/nginx.pid;
include /opt/rh/rh-nginx116/root/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/opt/rh/rh-nginx116/log/nginx/access.log main;
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
include /etc/opt/rh/rh-nginx116/nginx/mime.types;
default_type application/octet-stream;
include /etc/opt/rh/rh-nginx116/nginx/conf.d/*.conf;
}
[root@boy ~]
listen 80;
|