关于Linux访问web遇到403 Forbidden的问题
生活随笔
收集整理的這篇文章主要介紹了
关于Linux访问web遇到403 Forbidden的问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
問題:
大數據平臺的集群監控地址是通過一個代理(ip:port)訪問,在windows環境下設置代理是可以正常訪問;
但在linux環境下設置了代理卻不能訪問;telnet和ping代理是可以,但curl和wget卻出現問題。
2)curl執行情況:
[root@SJJH-SERVER2 ~]#curl -x ip:port http://c9m1.ecld.com:8088/cluster<div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="http://c9m1.ecld.com:8088/cluster">http://c9m1.ecld.com:8088/cluster</a></p><blockquote id="error"> <p><b>Access Denied.</b></p> </blockquote><p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p><p>Your cache administrator is <a href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&body=CacheHost%3A%2032ae9d8e1ec1%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2006%20Jun%202017%2003%3A00%3A33%20GMT%0D%0A%0D%0AClientIP%3A%20132.121.82.139%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2Fcluster%20HTTP%2F1.1%0AUser-Agent%3A%20curl%2F7.19.7%20(x86_64-unknown-linux-gnu)%20libcurl%2F7.19.7%20NSS%2F3.12.7.0%20zlib%2F1.2.3%20libidn%2F1.18%20libssh2%2F1.2.2%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AHost%3A%20c9m1.ecld.com%3A8088%0D%0A%0D%0A%0D%0A">webmaster</a>.</p> <br> </div>
對于該問題暫時還沒找到解決辦法,有遇到類似的可以一起溝通,后續找到找到解決方案更新文章。
大數據平臺的集群監控地址是通過一個代理(ip:port)訪問,在windows環境下設置代理是可以正常訪問;
但在linux環境下設置了代理卻不能訪問;telnet和ping代理是可以,但curl和wget卻出現問題。
1)wget返回錯誤:
[root@SJJH-SERVER2 ~]# wget -e "http_proxy=http://ip:port" http://c9m1.ecld.com:8088/cluster --2017-06-06 11:00:01-- http://c9m1.ecld.com:8088/cluster 正在連接 ip:port... 已連接。 已發出 Proxy 請求,正在等待回應... 403 Forbidden 2017-06-06 11:00:01 錯誤 403:Forbidden。2)curl執行情況:
[root@SJJH-SERVER2 ~]#curl -x ip:port http://c9m1.ecld.com:8088/cluster<div id="content"> <p>The following error was encountered while trying to retrieve the URL: <a href="http://c9m1.ecld.com:8088/cluster">http://c9m1.ecld.com:8088/cluster</a></p><blockquote id="error"> <p><b>Access Denied.</b></p> </blockquote><p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p><p>Your cache administrator is <a href="mailto:webmaster?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&body=CacheHost%3A%2032ae9d8e1ec1%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2006%20Jun%202017%2003%3A00%3A33%20GMT%0D%0A%0D%0AClientIP%3A%20132.121.82.139%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2Fcluster%20HTTP%2F1.1%0AUser-Agent%3A%20curl%2F7.19.7%20(x86_64-unknown-linux-gnu)%20libcurl%2F7.19.7%20NSS%2F3.12.7.0%20zlib%2F1.2.3%20libidn%2F1.18%20libssh2%2F1.2.2%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0AHost%3A%20c9m1.ecld.com%3A8088%0D%0A%0D%0A%0D%0A">webmaster</a>.</p> <br> </div>
對于該問題暫時還沒找到解決辦法,有遇到類似的可以一起溝通,后續找到找到解決方案更新文章。
網上查詢了下,問題解決的方向,一個是和web部署的目錄權限有關系;一個是和linux環境下不能執行web動態腳本有關系。
總結
以上是生活随笔為你收集整理的关于Linux访问web遇到403 Forbidden的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: HtmlUnit自动填写表单并提交
- 下一篇: Apache Ranger初识