针对你遇到的问题“/usr/local/nginx/html/favicon.ico failed (13: permission denied)”,我们可以按照以下步骤进行排查和解决: 确认文件/usr/local/nginx/html/favicon.ico的权限设置: 首先,我们需要检查favicon.ico文件的权限设置,确保Nginx服务运行的用户有足够的权限访问该文件。可以使用ls -l命令来查看文件权限...
nginx核心配置文件: server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root html; index index.html index.htm; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # error_page 500 502 ...
当浏览器访问ip:80时,会访问html目录下的index.html,同时浏览器会自动访问该目录下favicon.ico文件,作为浏览的图标,如果在这个目录没有的话就会报这个错。 二、解决方法 直接忽略,不影响使用 在html目录下创建个文件favicon.ico 在配置文件中加入如下配置(推荐): # set site favicon location /favicon.ico { log...
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"...
完美解决Nginx配置反向代理时出现的13: Permission denied) while connecting to upstream, client: 127.0.0.1 2019-12-23 15:53 − 1.条件不允许的情况下(不能随意重启计算机)执行下列代码: setsebool -P httpd_can_network_connect 1 12.其他情况下获取root权限 vim /etc/selinux/config1找到 SELINUX=enfor...
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;