teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

追記記入

2020/10/19 23:29

投稿

tomaa
tomaa

スコア84

title CHANGED
File without changes
body CHANGED
@@ -42,7 +42,7 @@
42
42
  server {
43
43
 
44
44
  listen 443 ssl default_server;
45
- server_name mydomainname.com 160.16.133.244;
45
+ server_name mydomainname.com xxx.xxx.xxx.xxx;
46
46
 
47
47
  ssl on;
48
48
  ssl_certificate /etc/letsencrypt/live/mydomainname.com/fullchain.pem;

3

内容編集

2020/10/19 23:28

投稿

tomaa
tomaa

スコア84

title CHANGED
File without changes
body CHANGED
@@ -16,6 +16,9 @@
16
16
 
17
17
  関係するファイル等は以下のとおりです。
18
18
 
19
+ **追記:
20
+ nginxの仕様だとセキュリティーの対策として、IPアドレス直打ちはアクセスさせないのが通常の仕様なのでしょうか?**
21
+
19
22
  ---
20
23
 
21
24
  wordpress.conf(編集済み)

2

内容編集

2020/10/19 21:07

投稿

tomaa
tomaa

スコア84

title CHANGED
File without changes
body CHANGED
@@ -18,10 +18,17 @@
18
18
 
19
19
  ---
20
20
 
21
- wordpress.conf
21
+ wordpress.conf(編集済み)
22
22
  ```
23
23
  server {
24
24
  listen 80;
25
+ listen [::]:80;
26
+ server_name mydomainname.com:
27
+ return 301 https://$host$request_uri;
28
+ }
29
+
30
+ server {
31
+ listen 80;
25
32
  listen 443 ssl;
26
33
  server_name www.mydomainname.com;
27
34
  ssl_certificate /etc/letsencrypt/live/mydomainname.com/fullchain.pem;
@@ -29,9 +36,10 @@
29
36
  return 301 https://mydomainname.com$request_uri;
30
37
  }
31
38
 
32
- server {
39
+ server {
40
+
33
41
  listen 443 ssl default_server;
34
- server_name mydomainname.com;
42
+ server_name mydomainname.com 160.16.133.244;
35
43
 
36
44
  ssl on;
37
45
  ssl_certificate /etc/letsencrypt/live/mydomainname.com/fullchain.pem;
@@ -41,11 +49,14 @@
41
49
  index index.html index.htm index.nginx-debian.html index.php;
42
50
 
43
51
  location / {
52
+
44
53
  try_files $uri $uri/ /index.php?args;
45
54
  }
46
55
 
56
+
47
57
  location ~ .php$ {
48
- include snippets/fastcgi-php.conf;
58
+ include snippets/fastcgi-php.conf;
59
+
49
60
  fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
50
61
  }
51
62
  }

1

内容編集

2020/10/19 20:45

投稿

tomaa
tomaa

スコア84

title CHANGED
File without changes
body CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  VPSサーバーでubuntu,nginxを利用し、wordpressサイトを構築しています。
4
4
 
5
- 上記のサーバーには、独自ドメインを入手し、https化してサイト紐付けを行っております。
5
+ 上記のサーバーには、独自ドメインを入手し、https化してサイト紐付けを行っております。
6
6
 
7
7
  ### 発生している問題・エラーメッセージ
8
8