3
我已經在我的Linux服務器上安裝了mono平臺,並且我能夠在nginx HTTP服務器後面運行它。該系統運行良好,完美地爲.NET特定的動態文件提供服務。什麼是.NET平臺文件擴展名?
但是,我只想傳遞所需的文件(擴展名)爲mono,並讓nginx處理所有其他文件,包括靜態文件和在.NET平臺上不應該在正常情況下提供的文件。我已經配置了我的nginx,如下所示,但是 - 因爲我對.NET平臺沒有足夠的瞭解 - 我不確定哪些擴展
應該
必須傳遞給mono,哪些擴展必須被禁止。
這裏是我的nginx的配置文件的相關部分:
# Do not pass .NET forbidden extensions to anywhere.
# Theese are the extensions that should not be served to the clients
location ~ \.(config|dbml|dll|master|other|forbidden|exts)$ {
deny all;
}
這裏是將將所需(僅)文件到單聲道配置部分:
# Theese are the extensions which *must* be handled by mono
location ~ \.(aspx|cs|other|exts|that|must|be|handled|by|mono)$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi.conf;
fastcgi_index default.aspx;
}
# Other static files will be handled by nginx.
我發現來自Wikipedia entry的一些.NET特定的文件擴展名,但它們還遠遠沒有完成。
所以我的問題有三個子問題:
- 什麼是.NET平臺特定的文件擴展名?
- 其中必須是由.NET引擎處理?
- 其中哪些是保密的,不得送達給客戶?
這將是一個共享主機環境,所以任何缺少的擴展可能會導致不良影響(例如,顯示的用戶密碼或應用程序設置)。
所以'System.Web.HttpForbiddenHandler'類型不能送達,是嗎? –
是的,你是對的。 –