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

質問編集履歴

5

1321

2019/12/05 23:24

投稿

退会済みユーザー
title CHANGED
@@ -1,1 +1,1 @@
1
- CENTOS7 nginxがブラウザで表示されない
1
+ firewall設定
body CHANGED
@@ -1,59 +1,4 @@
1
- お世話になります。
2
- ブラウザにipを打ってもnginxが表示されず困ってます。
3
-
4
- centos7
5
- nginx -v nginx version: nginx/1.11
6
-
7
- firewall設定
8
-
9
1
  ```ここに言語を入力
10
- sudo vi /etc/firewalld/services/ssh.xml
11
- ```
12
-
13
- ```ここに言語を入力
14
- <?xml version="0.0" encoding="utf-8"?>
15
- <service>
16
- <short>SSH</short>
17
- <description>Secure Shell (SSH) is a protocol for logging into and executing commands on remote machines. It provides secure encrypted communications. If you plan on accessing your machine remotely via SSH over a firewalled interface, enable this option. You need the openssh-server package installed for this option to be useful.</description>
18
- <port protocol="tcp" port="12345"/>
19
- </service>
20
- ```
21
- 以下実行済です
22
-
23
- ```ここに言語を入力
24
- sudo firewall-cmd --reload
25
- sudo systemctl restart sshd.service
26
-
27
- public (active)
28
- target: default
29
- icmp-block-inversion: no
30
- interfaces: eth0
31
- sources:
32
- services: dhcpv6-client http ssh
33
- ports: 12345/tcp
34
- protocols:
35
- masquerade: no
36
- forward-ports:
37
- source-ports:
38
- icmp-blocks:
39
- rich rules:
40
- ```
41
- 以下も実施しています。
42
-
43
- ステータスは正常です。
44
- ```ここに言語を入力
45
- systemctl status nginx
46
-
47
- * nginx.service - The nginx HTTP and reverse proxy server
48
- Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
49
- Active: active (running) since Thu 2019-10-10 14:14:08 JST; 2h 29min ago
50
- Main PID: 24412 (nginx)
51
- CGroup: /system.slice/nginx.service
52
- |-24412 nginx: master process /usr/sbin/nginx
53
- `-24413 nginx: worker process
54
- ```
55
-
56
- ```ここに言語を入力
57
2
  firewall-cmd --zone=public --add-port=12345/tcp --permanent
58
3
  sudo firewall-cmd --add-service=http --permanent
59
4
  sudo firewall-cmd --reload

4

2019/12/05 23:24

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -40,7 +40,20 @@
40
40
  ```
41
41
  以下も実施しています。
42
42
 
43
+ ステータスは正常です。
43
44
  ```ここに言語を入力
45
+ systemctl status nginx
46
+
47
+ * nginx.service - The nginx HTTP and reverse proxy server
48
+ Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
49
+ Active: active (running) since Thu 2019-10-10 14:14:08 JST; 2h 29min ago
50
+ Main PID: 24412 (nginx)
51
+ CGroup: /system.slice/nginx.service
52
+ |-24412 nginx: master process /usr/sbin/nginx
53
+ `-24413 nginx: worker process
54
+ ```
55
+
56
+ ```ここに言語を入力
44
57
  firewall-cmd --zone=public --add-port=12345/tcp --permanent
45
58
  sudo firewall-cmd --add-service=http --permanent
46
59
  sudo firewall-cmd --reload
@@ -48,18 +61,5 @@
48
61
  #エラー
49
62
  ブラウザ上でip160.160.160.160 を打っても応答時間が長すぎます。というエラーがでます
50
63
 
51
- #エラー2
52
- systemctl status httpd.service を打つと以下エラーが出ます。
53
64
 
54
- ```ここに言語を入力
55
- * httpd.service - The Apache HTTP Server
56
- Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
57
- Active: failed (Result: exit-code) since Thu 2019-10-10 16:12:11 JST; 6s ago
58
- Docs: man:httpd(8)
59
- man:apachectl(8)
60
- Process: 28847 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
61
- Process: 28846 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
62
- Main PID: 28846 (code=exited, status=1/FAILURE)
63
- ```
64
-
65
65
  よろしくお願いします。

3

ああ

2019/10/10 07:45

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -48,4 +48,18 @@
48
48
  #エラー
49
49
  ブラウザ上でip160.160.160.160 を打っても応答時間が長すぎます。というエラーがでます
50
50
 
51
+ #エラー2
52
+ systemctl status httpd.service を打つと以下エラーが出ます。
53
+
54
+ ```ここに言語を入力
55
+ * httpd.service - The Apache HTTP Server
56
+ Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
57
+ Active: failed (Result: exit-code) since Thu 2019-10-10 16:12:11 JST; 6s ago
58
+ Docs: man:httpd(8)
59
+ man:apachectl(8)
60
+ Process: 28847 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
61
+ Process: 28846 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
62
+ Main PID: 28846 (code=exited, status=1/FAILURE)
63
+ ```
64
+
51
65
  よろしくお願いします。

2

2019/10/10 07:13

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -41,6 +41,7 @@
41
41
  以下も実施しています。
42
42
 
43
43
  ```ここに言語を入力
44
+ firewall-cmd --zone=public --add-port=12345/tcp --permanent
44
45
  sudo firewall-cmd --add-service=http --permanent
45
46
  sudo firewall-cmd --reload
46
47
  ```

1

12

2019/10/10 07:09

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -38,5 +38,13 @@
38
38
  icmp-blocks:
39
39
  rich rules:
40
40
  ```
41
+ 以下も実施しています。
41
42
 
43
+ ```ここに言語を入力
44
+ sudo firewall-cmd --add-service=http --permanent
45
+ sudo firewall-cmd --reload
46
+ ```
47
+ #エラー
48
+ ブラウザ上でip160.160.160.160 を打っても応答時間が長すぎます。というエラーがでます
49
+
42
50
  よろしくお願いします。