nginx配置讓任何文件在瀏覽器中顯示文本text/plain
server {
listen 81;
root /var/www/applog;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
location / {
}
location ~ .*/188.188.1.*/.*\.log$ {
add_header Content-Type text/plain;
}
}
查看博文:nginx配置讓任何文件在瀏覽器中顯示文本text/plain
nginx配置讓任何文件在瀏覽器中顯示文本text/plain
相關推薦
nginx配置讓任何文件在瀏覽器中顯示文本text/plain
plog oot time gin header 顯示 lai server 博文 例子 server { listen 81; root /var/www/applog; autoindex on;
MATLAB檢查指定路徑中的子文件夾中的文件名中是否帶有空格
atl num 換行 pre col .com 輸出 size 文件的 測試文件夾為: clear;close all;clc; %% %程序實現的功能 %檢查指定路徑中的子文件夾中的文件名中是否帶有空格,並去掉文件名中的空格 %% %程序中用到
使用svn的過程中check out的文件路徑中的文件圖標全都加上了“藍色問號”的解決方案
問號 keyword bat 過程 解決 out 使用 方案 word (1)你在對同一層目錄下創建一個記事本文件,然後把下面這句話復制進去 for /r . %%a in (.) do @if exist "%%a\.svn" rd /s /q "%%a\.svn" (
linux批量替換指定文件夾中所有文件的指定內容
lac 指定 clas edit 批量替換 表示 文件的 文件 lin 命令:sed -i "s#https#http#g" `grep http -rl VEROMODA` 功能:用來替換當前目錄VEROMODA文件夾及子文件夾中所有文件中的https為http. 說明:
MFC+Opencv在單文件程式中顯示出一幅影象
在MFC中顯示一幅影象程式是十分複雜的,而在Opencv中讀入一幅影象只需要一句話,而且很多的影象處理操作都需要使用Opencv中已有的函式,所以在MFC中呼叫Opencv的函式顯示一幅影象是很必要的操作。現在網上很多相關的描述都很不詳盡,我總結並編寫程式測試後,依次介紹在對話方塊程式和單文件程式中
C++獲取文件夾中所有文件
系統屬性 時間 printf 文件中 hand www. 無符號 image blog 獲取文件夾中的文件,用到過很多次,每次用的時候都要去查下,很煩,所以想自己寫下,當然,借鑒了很多其他大佬的博客 主要實現的函數,如下: 1 void getFiles( string
在AndroidManifest(清單文件)中註冊activity(活動)及配置主活動、更改App圖標、App名稱、修改隱藏標題欄
雙擊 建議 nba cat ima manager ram spa src 打開app/src/main/AndroidManifest。 1 <?xml version="1.0" encoding="utf-8"?> 2 <manifest xm
解決下載ftp文件過程中,瀏覽器直接解析文件(txt,png等)的問題
filename map 需要 etc home 3.0.0 var att esp 搭建了一個ftp服務器,供用戶進行上傳下載,在下載過程中發現,一些文件,例如txt,jpg,png,pdf等直接被瀏覽器解析了。在瀏覽器中顯示其內容,沒有下載。 下面通過網上查詢得到一些解
Word文件方框中輸入“√”、“×”的簡單方法,絕對讓你相見恨晚!
在編輯Word文件時有一些小白就像小編才開始的時候用拼音打出“√”、“×”,這樣不僅顯的沒技術含量而且如果遇到在方框中輸入“√”、“×”,就徹底沒辦法了,但是不要害怕,小編今天就交大家一個非常有技術含量的方法,一起來看看吧。 1.ALT+數字鍵 按住alt鍵不放,然後輸入數字9745就會出
CSS及JS文件中文註釋程式碼在瀏覽器中顯示亂碼
CSS在第一行新增 @charset "utf-8"; 或者 @charset "gb2312";JS檔案 把JS檔案從伺服器端下載到本地,重新改變編碼格式後重新上傳即可
web項目中關於引入JS/css文件, 瀏覽器console出現 net::ERR_ABORTED錯誤的解決方法
can info ons pan 分享圖片 abort 控制臺 -h mage 如圖錯誤: 引入js/css後,控制臺出現的錯誤! 我的錯誤則是因為在靜態文件夾下的原因. 解決:如果要放在webRoot下的靜態(static)文件夾下,需要在springMv
將IDEA maven項目中src源代碼下的xml等資源文件編譯進classes文件夾
默認 文件的 ips src directory htm 文件夾 ref 編譯 如題,IDEA的maven項目中,默認源代碼目錄下的xml等資源文件並不會在編譯的時候一塊打包進classes文件夾,而是直接舍棄掉。 如果使用的是Eclipse,Eclipse的src目錄下
文件系統中的journal device和write cache
文件系統 journal device write cache 眾所周知,文件系統中的journal device主要有兩個目的:1.保證數據的一致性;2.縮短寫響應時間要保證數據的一致性,當然避免不了和磁盤write cache的交互,這體現在兩個層次:1.文件系統中對journal devic
頭文件algorithm中的常用函數
執行 max pan style col 叠代器 n個元素 刪除 enc 頭文件algorithm中的常用函數 一、非修改性序列操作(12個) 循環 對序列中的每個元素執行某操作 for_each() 查找 在序列中找出某個值
C# 讀取指定文件夾中的全部文件,並按規則生成SQL語句!
fun .text line -m ava inf hid 語句 ade 本實例的目的在於: 1 了解怎樣遍歷指定文件夾中的全部文件 2 控制臺怎樣輸入和輸出數據 代碼: using System; using System.IO; nam
perl怎麽拷貝一個文件到另一個文件夾中或者怎麽拷貝文件夾到另一個文件夾
不存在 程序 bold 拷貝文件 color 函數 str del 文件夾 File::Copy 主要提供了copy和move函數#!/usr/bin/perluse strict; use warnings; use File::Copy; my $filein=$AR
lnmp 搭建後,nginx下php文件404但是html文件正常訪問【已解決】
() stack 找到 span nec mis group php 方法 今天遇到 了如題的問題。 上網查了很多資料 最終是在這個鏈接 裏 找到了能解決我的問題的方法 https://stackoverflow.com/questions/23443398/nginx-e
遞歸遍歷某個文件夾(包括子文件)中的左右內容
trees font pan 包括 == fun color function func <?php //直接遍歷所有文件.遞歸 function trees($dirname){ $dirOb = dir($dirname);
python中讀取某個路徑文件夾下所有文件--listdir()
文件夾路徑 .com hub 描述 路徑 -a 函數 list bsp 描述: 當需要讀取某個文件下的所有文件時,可以使用listdir()函數,使用該函數之前,需導入模塊:from os import listdir 語法: listdir(‘file path/
java文件下載中中文為空格的解決
encoder nco java res getname content isp filename nload 在文件下載中設置的addheader中將filename設置為 filename=\""+ URLEncoder.encode(downloadFile.getN