nignx访问出现空白

您所在的位置:网站首页 网页打开后是空白 nignx访问出现空白

nignx访问出现空白

2023-12-19 04:17| 来源: 网络整理| 查看: 265

将应用包从代码仓库拉下来后 打包成*.tar.gz

上传至目前服务器

nginx 配置如下: 

server { listen 82; server_name 1.1.1.1; root /data/h5/common-qr-code/; index index.html index.htm index.php; location ^~ / { #access_log logs/static-oa.log main; #rewrite /newcar/(.*)$ /newcar/index.html break; try_files $uri $uri/ /index.html; } #location /api { # proxy_pass http://127.0.0.1:9100/; #} }

重新加载nginx

nginx -s reload

浏览器访问:

1.1.1.1:82 页面空白  

查看nginx 日志:

tail -f  /var/log/nginx/error.log

28787#0: *16070456 open() "/data/h5/common-qr-code/images/qrcode.png" failed (13: Permission denied)

无权限访问目录  

 

解决方法:指定文件的拥有者和组

chown -R nginx:nginx ./common-qr-code

 

 

 

 

 

 



【本文地址】


今日新闻


推荐新闻


    CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3