整合營銷服務商

          電腦端+手機端+微信端=數據同步管理

          免費咨詢熱線:

          網站404或空白怎么辦?

          網站404或空白怎么辦?

          戶反映:說自己的網站走nginx代理后,打開空白。直接IP加地址訪問是好的(http://ip:port)

          故障排查

          1、打開chrome瀏覽器,訪問了下,訪問情況真是客戶描述的那樣。

          2、感覺打開chrome ,開發者工具,發現部分請求URL是404,css和js的



          3、找客戶要服務器登錄的賬號,檢查nginx配置文件

          upstream www.test.com{
           server 127.0.0.1:8080;
          }
          server {
           listen 80;
           listen 443 ssl http2;
           ssl_certificate /usr/local/nginx/conf/ssl/www.test.com.pem;
           ssl_certificate_key /usr/local/nginx/conf/ssl/www.test.com.key;
           server_name www.test.com;
           access_log /data/wwwlogs/www.test.com_nginx.log combined;
           index index.html index.htm index.jsp;
           root /data/wwwroot/www.test.com;
           
           
           location ~ .*\.(js|css)?$ {
           
           expires 7d;
           access_log off;
           }
          ?
           location / {
           proxy_pass http://www.test.com;
           include proxy.conf;
           }
          }
          

          4、大家有發現上面配置有問題不?剛開始我也沒有注意,自認為配置文件是對 的。

          打算檢查nginx的日志,一遍請求URL,一遍查看nginx果然還是404.(感覺疑惑),明明配置了proxy_pass http://www.test.com。

          故障原因:

          是因為 “location ~ .*\.(js|css)?$” 這個匹配攔截掉了,請求不能正常發往下一個“location /” ,也就不能正常抵達后端proxy_pass了。

          解決方法:

          第一種解決方法:是將后端的靜態文件(css 和js ),放入前置nginx 機器/data/wwwroot/www.test.com

          第二種解決方法 :修改配置文件

          upstream www.test.com{
           server 127.0.0.1:8080;
          }
          server {
           listen 80;
           listen 443 ssl http2;
           ssl_certificate /usr/local/nginx/conf/ssl/www.test.com.pem;
           ssl_certificate_key /usr/local/nginx/conf/ssl/www.test.com.key;
           server_name www.test.com;
           access_log /data/wwwlogs/www.test.com_nginx.log combined;
           index index.html index.htm index.jsp;
           root /data/wwwroot/www.test.com;
           
          ?
           location ~ .*\.(js|css)?$ {
           proxy_pass http://www.test.com;
           expires 7d;
           access_log off;
           }
          ?
           location / {
           proxy_pass http://www.test.com;
           include proxy.conf;
           }
          }
          

          ?

          天第一次看HTML5的書籍,嘗試使用記事本編寫第一個網頁,不料,打開網頁后,竟然是亂碼狀態,愁煞吾也,這個問題怎么破呢?經查相關資料,是因為記事本默認存儲的編碼格式與html中的編碼格式不一致導致的.....

          情況具體是這樣的:

          第一步是將寫好的內容的記事本的后綴“TXT”改成了HTML

          打開網頁之后是這樣的:亂碼


          查閱資料后,解決方法是這樣的:

          在網頁空白處點擊右鍵,找到編碼點擊,選擇UTF-8,問題就解決了。



          還有一種方法就是,使用記事本另存為修改后綴名為HTML,編碼處選擇UTF-8,就不會出現亂碼現象了。

          題1:openj9環境使用profiler命令輸出內存火焰圖為空

          問題現象

          基于openjdk,使用-d參數控制持續60s后自動停止,使用瀏覽器打開html報告,內容顯示正常:

          [root@test arthas]# /usr/bin/java -jar arthas-boot.jar 
          [arthas@44794]$ profiler start -e alloc -d 60
          Profiling started
          profiler will silent stop after 60 seconds.
          profiler output file will be: /arthas-output/20240326-171613.html 

          基于openjdk-openj9,同樣使用-d參數控制持續60s后自動停止,使用瀏覽器打開html報告,內容顯示空白:

          [root@test arthas]# /usr/lib/openj9/bin/java -jar arthas-boot.jar 
          [arthas@7857]$ profiler start -e alloc -d 60
          Profiling started
          profiler will silent stop after 60 seconds.
          profiler output file will be: /arthas-output/20240326-163013.html 

          解決方法

          profileropenjdk-openj9的支持還不夠全面,可以通過不加-d參數,主動stop臨時規避:

          [root@test arthas]# /usr/lib/openj9/bin/java -jar arthas-boot.jar 
          [arthas@7857]$ profiler start -e alloc
          Profiling started
          
          [arthas@7857]$ profiler stop
          OK
          profiler output file : /arthas-output/20240326-163522.html 

          使用這種方法,可以正常輸出基于內存的火焰圖。


          主站蜘蛛池模板: 无码人妻精品一区二区三区不卡 | 亚洲一区中文字幕| 中文字幕乱码人妻一区二区三区| 免费国产在线精品一区| 久久精品无码一区二区三区免费| 红杏亚洲影院一区二区三区| 国产一区二区免费在线| AA区一区二区三无码精片| 久久婷婷色一区二区三区| 午夜无码一区二区三区在线观看 | 春暖花开亚洲性无区一区二区| 一区二区三区四区免费视频 | 中文字幕无码不卡一区二区三区| 国产福利视频一区二区| 久久无码人妻一区二区三区午夜 | 日韩精品电影一区| 亚洲精品伦理熟女国产一区二区| 久久精品一区二区三区日韩| 中文字幕精品一区| 国产一区二区在线视频| 成人无码一区二区三区| 精品国产亚洲一区二区在线观看| 日本高清无卡码一区二区久久| 无码国产精品一区二区高潮| 濑亚美莉在线视频一区| 国产精品亚洲一区二区三区在线观看 | 亚洲一区二区三区在线 | 久久中文字幕一区二区| 自慰无码一区二区三区| 无码日韩精品一区二区免费暖暖| 久久婷婷久久一区二区三区| 无码国产精成人午夜视频一区二区 | 一区二区三区在线观看| 亚洲国产精品一区二区三区在线观看 | 成人精品一区二区激情| 色婷婷亚洲一区二区三区| 日本夜爽爽一区二区三区| 不卡一区二区在线| 一区二区视频在线| 无码午夜人妻一区二区不卡视频| 视频一区视频二区在线观看|