0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

NginxとRoute53を使ってドメインでアプリを表示させる

Last updated at Posted at 2020-10-01

問題

アプリを本番環境にデプロイし終えたところ。
Elastic IPアドレスではブラウザにアプリが表示されるが、ドメインでは表示されない。

スクリーンショット 2020-10-01 午後1.37.33.png

解決法

vimでNginxの設定ファイルを開いて

// pfc-masterはアプリ名です

[naota@ip-10-0-0-32 ~]$ cd /etc/nginx/conf.d/
[naota@ip-10-0-0-32 conf.d]$ sudo vi pfc-master.conf    
アプリ名.conf
//before 
server_name Elastic IPアドレス;
 ↓ 
//after
server_name ドメイン名;

Nginxの設定ファイルアプリ名.confserver_nameをElastic IPアドレスからドメイン名に変更する。

その後Nginxをreloadして設定の変更を反映させる。

sudo nginx -s reload

参考記事

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?