dss nginx 403 forbidden
在centos7上面搭建 DataSphereStudio 精簡版, 一切安裝成功之後, 發現訪問 ip:8088 一直顯示 403 forbidden, 一直以為是軟體裝的不對, 追個排查之後才發現是 nginx的問題,nginx的 配置他沒寫, 我們使用的是預設配置, 預設配置下 nginx 的程式使用者是nginx使用者, nginx 使用者沒有許可權訪問dss 的web資源.
nginx 報錯日誌:
2020/12/16 14:26:02 [error] 5951#0: *1 "/home/bank/dss/dss_linkis/web/dist/index.html" is forbidden (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET / HTTP/1.1", host: "10.10.10.62:8089"
2020/12/16 14:26:02 [error] 5951#0: *1 open() "/home/bank/dss/dss_linkis/web/dist/favicon.ico" failed (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "10.10.10.62:8089", referrer: "http://10.10.10.62:8089/"
2020/12/16 14:26:53 [error] 5951#0: *1 "/home/bank/dss/dss_linkis/web/dist/index.html" is forbidden (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET / HTTP/1.1", host: "10.10.10.62:8089"
2020/12/16 14:26:54 [error] 5951#0: *1 open() "/home/bank/dss/dss_linkis/web/dist/favicon.ico" failed (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "10.10.10.62:8089", referrer: "http://10.10.10.62:8089/"
2020/12/16 14:31:14 [error] 5951#0: *3 "/home/bank/dss/dss_linkis/web/dist/index.html" is forbidden (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET / HTTP/1.1", host: "10.10.10.62:8089"
2020/12/16 14:31:14 [error] 5951#0: *3 open() "/home/bank/dss/dss_linkis/web/dist/favicon.ico" failed (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "10.10.10.62:8089", referrer: "http://10.10.10.62:8089/"
2020/12/16 14:31:14 [error] 5951#0: *3 "/home/bank/dss/dss_linkis/web/dist/index.html" is forbidden (13: Permission denied), client: 10.0.8.8, server: localhost, request: "GET / HTTP/1.1", host: "10.10.10.62:8089"
具體解決方法如下:
這裡參考的是 新增連結描述
上面的日誌中“Permission denied”,一看就知道是許可權出了問題,通過 ps -ef | grep nginx,檢視 nginx 的程式資訊:
root 15889 1 0 00:01 ? 00:00:00 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
nginx 15890 15889 0 00:01 ? 00:00:00 nginx: worker process
root 16795 15654 0 00:48 pts/3 00:00:00 grep --color=auto nginx
發現 nginx 程式的使用者是 nginx,而我們建立 /root/nginx/html/daolian/favicon.ico 檔案的使用者是root;因此,只要把 nginx 的程式 user 改為 root 即可,vim /etc/nginx/nginx.conf:
user root;
之後,/etc/init.d/nginx restart 重啟 nginx,就可以正常訪問網站了。
相關文章
- FreeBSD Transmission 403 ForbiddenORB
- Heroku 403 Forbidden Procfile 配置未生效ORB
- 解決圖片訪問403 Forbidden問題ORB
- 爬蟲之遇到403 Forbidden,IP被封,怎麼辦?爬蟲ORB
- apache 經常無法訪問目錄列表,顯示 403 forbiddenApacheORB
- 處理SAP HANA Web-Based Development Workbench的403 Forbidden錯誤WebdevORB
- 釋出npm包遇到的報錯: ERR! 403 Forbidden, Are you logged in as the correct userNPMORB
- 如何處理SAP HANA Web-Based Development Workbench的403 Forbidden錯誤WebdevORB
- nginx出現403錯誤的解決方法Nginx
- 遇到403 Forbidden ,伺服器端查詢後結果是http get查詢字串中包含非法字元ORB伺服器HTTP字串字元
- svn access to forBiddenORB
- openGauss DSS功能增強
- Grafana Nginx 403 Origin not allowed 及 ws websocket連線錯誤解決GrafanaNginxWeb
- openGauss DSS執行緒池執行緒
- sonic 部署,拉取映象 ForbiddenORB
- 決策支援系統(Decision Support System,DSS)
- LeLeetCode 403. 青蛙過河LeetCode
- PCI-DSS(V3.2)學習筆記(二)筆記
- DSS+Linkis Ansible 單機一鍵安裝指令碼指令碼
- PMS API報錯403 client token authorization failAPIclientAI
- 解決npm install報錯Tried to download(403)NPM
- 005-blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]BloCORBIndexdeleteAPI
- docker 部署 Laravel 上線訪問 403 記錄DockerLaravel
- 使用Intellij建立springboot專案Spring Initializr Error 403IntelliJSpring BootError
- gitee上傳程式碼https返回403報錯GiteeHTTP
- HTTP 常用狀態碼200 301 302 403 500HTTP
- Django Error: [WinError 10013] An attempt was made to access a socket in a way forbidden by its access permissionsDjangoErrorORB
- LeetCode 403 Frog Jump 青蛙過河 Javascirpt 解決方案LeetCodeJava
- nacos2.3.0版本403 user not found錯誤
- 【報錯】elasticsearch 報錯blocked by: [FORBIDDEN/12/index read-only / allow delete (api)]ElasticsearchBloCORBIndexdeleteAPI
- 海外的bug-hunters,不一樣的403bypass
- 寶塔https佈置dcat專案admin訪問403HTTP
- 【Nginx】Nginx容器Nginx
- jenkins 升級踩坑,主要是403 CSRF報錯問題Jenkins
- PbootCMS 織夢安裝出現403錯誤禁止訪問boot
- 如何解決apache 403錯誤問題?Linux學習教程ApacheLinux
- Nginx-04-Docker NginxNginxDocker
- 使用HTTP頭進行403繞過 速率繞過 Rate Limit BypassHTTPMIT