請問如何制作得到如下效果:
點擊一個鏈接的時候自動轉向一個空白一樣的網頁并彈出如下視窗,使得自己制作的exe程式能被直接下載。

uj5u.com熱心網友回復:
你這個問題不就是利用nginx服務搭建網站檔案共享服務器第一個步驟: 撰寫組態檔(www.conf)
nginx模塊功能: ngx_http_autoindex_module
Syntax: autoindex on | off;
Default:
autoindex off;
Context: http, server, location
server {
listen 80;
server_name www.oldboy.com;
location / {
root /html/www;
auth_basic "oldboy-sz-01";
auth_basic_user_file password/htpasswd;
autoindex on; --- 開啟nginx站點目錄索引功能
}
PS: 1. 需要將首頁檔案進行洗掉
2. mime.types媒體資源型別檔案作用
檔案中有的擴展名資訊資源, 進行訪問時會直接看到資料資訊
檔案中沒有的擴展名資訊資源, 進行訪問時會直接下載資源
網站頁面目錄資料,中文出現亂碼,如何解決:
location / {
root /html/www;
#index index.html;
auth_basic "oldboy-sz-01";
auth_basic_user_file password/htpasswd;
autoindex on;
charset utf-8; --- 修改目錄結構中出現的中文亂碼問題
}[/code]
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/38000.html
標籤:專題技術討論區
