LoginSignup
1
1

More than 3 years have passed since last update.

AWS lightsailでルートディレクトリを変更する

Last updated at Posted at 2020-08-06

AWS lightsail + node.jsでルートディレクトリを変更したい

node.jsをインストールしたlinuxベースのAWS lightsailで、
gitクローンしたディレクトリをディレクトリルートに指定します。

laightsailの環境は
・nodejs v12.16.1
・apache v2.4.41(unix)

sudo vi /opt/bitnami/apache2/conf/bitnami/bitnami.conf

で、viエディタを開きます。

escキーを押してから

/DocumentRoot

でドキュメントルートを指定している行にジャンプします。
(普通にカーソル移動でもokです。)

ここで、

DocumentRoot "gitクローンしたファイルパス"

IPアドレスやドメインをたたけば、htmlファイルが表示されます。

1
1
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
1
1