1. 程式人生 > >nginx url中帶中文不能訪問

nginx url中帶中文不能訪問

title: nginx url中帶中文不能訪問
date: 2017-12-18 16:29:00
categories:
- Android
tags:
- nginx
- shell

- 前端

解決nginx 部署,url中帶中文不能訪問

利用rz命令上傳windows網站部署檔案
輸入rz回車會彈出資料夾選擇 上傳檔案

之前用zip壓縮檔案打包,發現檔案變亂碼,用7z壓縮 就正常了

一、檔案上傳

搜尋7z安裝包

apt-cache search "7z"

安裝7z

 apt install p7zip-full

用之前解壓windows的zip有亂碼換成7z的就好了
把壓縮包解壓到blog

-r遞迴的意思-o指定解壓目錄,-o和目錄不能有空格

7za x public.7z -r-oblog

遞迴給blog資料夾新增執行許可,否則會報403 fobidden

chmod -R +x blog

nginx 配置
編輯nginx.conf 中server 節點設定字元及目錄,然後重啟nginx

charset utf-8;
root   /phpstudy/www/blog/;