{"id":9622,"date":"2023-06-02T21:24:11","date_gmt":"2023-06-02T21:24:11","guid":{"rendered":"https:\/\/max-drake.cc\/?p=9622"},"modified":"2023-06-02T21:24:16","modified_gmt":"2023-06-02T21:24:16","slug":"python-remote-trigger-from-subdomain-on-website","status":"publish","type":"post","link":"https:\/\/max-drake.cc\/?p=9622","title":{"rendered":"Python Remote Trigger from subdomain on Website"},"content":{"rendered":"\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe title=\"Python Remote Trigger from subdomain on Website\" width=\"678\" height=\"381\" data-src=\"https:\/\/www.youtube.com\/embed\/tJwL5M_wGvM?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" allowfullscreen src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" class=\"lazyload\" data-load-mode=\"1\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Following on from the <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=fJN16mVmTKU\" target=\"_blank\">Python Remote Trigger Scripts at variable User Selected Times video<\/a><\/strong>  where I did a button from a IP address website, I wanted to create a website on a SUBDOMAIN of one of my existing Domains.<br>In this video I show how to set it up for Windows Server IIS so that it can be accessed externally from outside of the server.<br>I also show how you can run it locally on the server without having to add a subdomain on your hosting site, using the HOST file located at C:\\Windows\\System32\\drivers\\etc\\hosts that you can access with Notepad.exe run as Administrator.<br>My domain hosts are Cloudflare (which is a CDN site Content Delivery Network) and Freenom ( just a normal site that hosts the domain names).<br>Using https certificates, (generated for free using LetsEncrypt, use a non matching certificate to test the subdomain being reachable from external browsers.<br>I had to reset up my Python Flask app in another folder under the Domain name that I was using to host the subdomain, so you will need to follow the <strong><a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=Cer6HwrVgyg\" target=\"_blank\">Gyan Of Python&#8217;s Python Flask Application On IIS | Deploy Flask Application On IIS<\/a><\/strong> video <br>He has a repository of github with some scripts : https:\/\/github.com\/mayurvkorde\/Flask-Application-On-IIS to help you create IIS site that will run the flaskapp to do this.<br>Ensure that all the items he highlights HAVE PERMISSIONS given to them!<\/p>\n\n\n\n<p>This is a progression from getting the web button to activate a remote pythonscript and the next 2 articles takes this further. <\/p>\n\n\n\n<p>Having an actual domain or subdomain to fix your app to mean you do not need to expose your server I address and can therefore move it around to different sites. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">End comment <\/h3>\n\n\n\n<p>I like the fact that I can just memorise the subdomain address rather than lots of numbers for the I address and port number. <\/p>\n\n\n\n<p>This has now opened up a few opportunities for building a lot of apps and hosting them on my server. <\/p>\n\n\n\n<p>The process was a bit frustrating at times and there were not too many examples of how to do this. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Following on from the Python Remote Trigger Scripts at variable User Selected Times video where I did a button from a IP address website, I wanted to create a website on a SUBDOMAIN of one of my existing Domains.In this video I show how to set it up for Windows Server IIS so that it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":9623,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[204,42,34,29,468],"tags":[],"class_list":["post-9622","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-automation","category-productivity","category-python","category-web","category-webapps"],"featured_image_src":"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/06\/Python-Remote-Trigger-from-subdomain-on-Website-YouTube-\u2014-Mozilla-Firefox22_36.jpg","featured_image_src_square":"https:\/\/max-drake.cc\/wp-content\/uploads\/2023\/06\/Python-Remote-Trigger-from-subdomain-on-Website-YouTube-\u2014-Mozilla-Firefox22_36.jpg","author_info":{"display_name":"Max Drake","author_link":"https:\/\/max-drake.cc\/?author=1"},"_links":{"self":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/9622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9622"}],"version-history":[{"count":1,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/9622\/revisions"}],"predecessor-version":[{"id":9624,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/posts\/9622\/revisions\/9624"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=\/wp\/v2\/media\/9623"}],"wp:attachment":[{"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/max-drake.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}