KnowHow

技術的なメモを中心にまとめます。
検索にて調べることができます。

Dash: <iis> WindowsサーバでDash(flask)を動かすには?

登録日 :2023/04/09 15:53
カテゴリ :python dash

<メモ2 IISの設定からFastCGIを有効にすることでも行けるかも?>
(参考URL)
https://medium.com/@b-nouri/how-to-deploy-your-dash-app-on-iis-windows-server-98a16b8707e1
https://medium.com/@dpralay07/deploy-a-python-flask-application-in-iis-server-and-run-on-machine-ip-address-ddb81df8edf3

FastCGI(推奨ではないかも)だが、IISの設定だけでDash(正確にはFlaskを動かす)ためにFastCGIを有効にすることができるかもしれいない。

FastCGIはpythonのライブラリでインストールする
pip install wfastcgi

これを、IISの設定で参照するようにすればいけるか?
Open Server Manager and select Manage > Add Roles and Features

Accept the default configurations and continue till we see the “Role Services ” screen. Select “CGI” under “Application Development” and select “Next”

IISマネージャーから、FastCGIを選択して有効にする。
Go to this path “C:\Python\Scripts\” and execute the “wfastcgi-enable.exe” file. This will enable the FastCGI module and attach it with the IIS server.

うーん、思ったよりIISとのつなぎこみは難しいような印象。

(追記)
IISでWebアプリケーションを追加
https://creativeweb.jp/personal-site/application/
参照権限について
(機能:ディレクトリ参照)
https://learn.microsoft.com/ja-jp/troubleshoot/developer/webapps/iis/health-diagnostic-performance/http-403-14-forbidden-webpage
(アクセス権)
https://tex2e.github.io/blog/windows/iis-401-3-unauthorized

IISでpythonを使えるようにしてみよう
https://www.ipentec.com/document/windows-server-setup-active-python-on-iis

WindowsServerでCGIを有効にする
https://www.ipentec.com/document/windows-windows-server-install-fast-cgi-module

Windows 10 PC(home/pro)のIISでCGIを有効化する
https://qiita.com/imoimo2009/items/cbe2dd3aeb0a2e449ce6

Windows Serverでサーバ用のライブラリインストールメモ

・wfastcgi
pip3 install wfastcgi

・waitress
pip3 install waitress


・waitress start
waitress-serve --listen=*:8000 wsgi:application