0
0

More than 1 year has passed since last update.

【Azure】App Serviceのnginxの設定を初期化しない方法

Last updated at Posted at 2022-12-06

問題

App Serviceで作成したWebアプリのnginxの設定ファイルが、仮想ネットワーク統合やデプロイなどする度に初期化されてしまいます。その都度、設定ファイルを変更するのは面倒ですが、ドキュメントにその対策方法が記載されていたため、忘備録として記事にさせていただきます。

解決方法

App Serviceのスタートアップコマンドから、nginxの設定ファイルをコピーして、nginxを再起動します。
ドキュメントに記載されているコマンドはすでに、/home/site/wwwroot/にコピーしている想定ですので、下記コマンドを実行しておきます。

cp /etc/nginx/sites-available/default /home/site/wwwroot/default

そして、ドキュメントに記載されてあるコマンドを入力して設定します。
これでnginxの設定を永続化することが可能です。

ドキュメント

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0