के बाहर स्टेटिक फाइलें मैं अपने एसएसएल के लिए अपने @ होम वेब-सर्वर पर यह https://github.com/ebekker/ACMESharp का उपयोग कर रहा हूं (यह मुफ़्त है!: ओ)। यह बहुत ही मैनुअल था, लेकिन विकी पर ध्यान दिया गया कि उसने https://github.com/Lone-Coder/letsencrypt-win-simple पर एक और प्रोजेक्ट का उल्लेख किया जो आपके वेब सर्वर पर आपके एसएसएल प्रमाण के लिए आवेदन करने, डाउनलोड करने और इंस्टॉल करने के स्वचालन के लिए एक जीयूआई था।wwwroot के बाहर .netcore एप
डोमेन को सत्यापित करने के लिए जीयूआई का उपयोग आपकी विधि है, [webroot]/.well-known/[randomFile]
w/o एक्सटेंशन के भीतर पाठ की एक यादृच्छिक स्ट्रिंग के साथ यादृच्छिक रूप से नामित फ़ाइल बनाई गई है। इस [वेबूट] पर चल रहे। डॉटनेटकोर एप्लिकेशन के साथ, मैं आईआईएस के तहत "हैंडलर मैपिंग" को बदलने के निर्देशों का पालन करने के बाद भी फ़ाइल की सेवा करने में असमर्थ हूं।
ऐसा लगता है कि मैं [webRoot]/wwwroot/[whatever]
पर सीधे उन्हें नेविगेट करके फ़ाइलों की सेवा कर सकता हूं - तो मैं [webroot]/.well-known/[randomFile]
में क्यों नहीं कर सकता?
कोई भी इस के आसपास एक रास्ता जानता है? मैं .netcore ऐप को हटा सकता हूं, फिर एसएसएल प्रमाणपत्र स्थापना चला सकता हूं, लेकिन इस इंस्टॉलेशन को हर 2-3 महीने में होने की जरूरत है, और चूंकि यह मैनुअल है, मैं यह समझना पसंद करूंगा कि इसे सही तरीके से कैसे किया जाए। नोट -
// allows for the direct browsing of files within the wwwroot folder
app.UseStaticFiles();
// Allow static files within the .well-known directory to allow for automatic SSL renewal
app.UseStaticFiles(new StaticFileOptions()
{
ServeUnknownFileTypes = true, // this was needed as IIS would not serve extensionless URLs from the directory without it
FileProvider = new PhysicalFileProvider(
Path.Combine(Directory.GetCurrentDirectory(), @".well-known")),
RequestPath = new PathString("/.well-known")
});
// MVC routes
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
संपादित करें: https://docs.asp.net/en/latest/fundamentals/static-files.html
मेरी Statup.cs में मूल रूप सेमैं इसे बदलने के लिए की जरूरत::
// allows for the direct browsing of files within the wwwroot folder
app.UseStaticFiles();
// MVC routes
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller=Home}/{action=Index}/{id?}");
});
इस के लिए