質問編集履歴

5

1321

2019/12/05 23:24

投稿

退会済みユーザー
test CHANGED
@@ -1 +1 @@
1
- CENTOS7 nginxがブラウザで表示されない
1
+ firewall設定
test CHANGED
@@ -1,113 +1,3 @@
1
- お世話になります。
2
-
3
- ブラウザにipを打ってもnginxが表示されず困ってます。
4
-
5
-
6
-
7
- centos7
8
-
9
- nginx -v nginx version: nginx/1.11
10
-
11
-
12
-
13
- firewall設定
14
-
15
-
16
-
17
- ```ここに言語を入力
18
-
19
- sudo vi /etc/firewalld/services/ssh.xml
20
-
21
- ```
22
-
23
-
24
-
25
- ```ここに言語を入力
26
-
27
- <?xml version="0.0" encoding="utf-8"?>
28
-
29
- <service>
30
-
31
- <short>SSH</short>
32
-
33
- <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>
34
-
35
- <port protocol="tcp" port="12345"/>
36
-
37
- </service>
38
-
39
- ```
40
-
41
- 以下実行済です
42
-
43
-
44
-
45
- ```ここに言語を入力
46
-
47
- sudo firewall-cmd --reload
48
-
49
- sudo systemctl restart sshd.service
50
-
51
-
52
-
53
- public (active)
54
-
55
- target: default
56
-
57
- icmp-block-inversion: no
58
-
59
- interfaces: eth0
60
-
61
- sources:
62
-
63
- services: dhcpv6-client http ssh
64
-
65
- ports: 12345/tcp
66
-
67
- protocols:
68
-
69
- masquerade: no
70
-
71
- forward-ports:
72
-
73
- source-ports:
74
-
75
- icmp-blocks:
76
-
77
- rich rules:
78
-
79
- ```
80
-
81
- 以下も実施しています。
82
-
83
-
84
-
85
- ステータスは正常です。
86
-
87
- ```ここに言語を入力
88
-
89
- systemctl status nginx
90
-
91
-
92
-
93
- * nginx.service - The nginx HTTP and reverse proxy server
94
-
95
- Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
96
-
97
- Active: active (running) since Thu 2019-10-10 14:14:08 JST; 2h 29min ago
98
-
99
- Main PID: 24412 (nginx)
100
-
101
- CGroup: /system.slice/nginx.service
102
-
103
- |-24412 nginx: master process /usr/sbin/nginx
104
-
105
- `-24413 nginx: worker process
106
-
107
- ```
108
-
109
-
110
-
111
1
  ```ここに言語を入力
112
2
 
113
3
  firewall-cmd --zone=public --add-port=12345/tcp --permanent

4

2019/12/05 23:24

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -82,6 +82,32 @@
82
82
 
83
83
 
84
84
 
85
+ ステータスは正常です。
86
+
87
+ ```ここに言語を入力
88
+
89
+ systemctl status nginx
90
+
91
+
92
+
93
+ * nginx.service - The nginx HTTP and reverse proxy server
94
+
95
+ Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)
96
+
97
+ Active: active (running) since Thu 2019-10-10 14:14:08 JST; 2h 29min ago
98
+
99
+ Main PID: 24412 (nginx)
100
+
101
+ CGroup: /system.slice/nginx.service
102
+
103
+ |-24412 nginx: master process /usr/sbin/nginx
104
+
105
+ `-24413 nginx: worker process
106
+
107
+ ```
108
+
109
+
110
+
85
111
  ```ここに言語を入力
86
112
 
87
113
  firewall-cmd --zone=public --add-port=12345/tcp --permanent
@@ -98,32 +124,6 @@
98
124
 
99
125
 
100
126
 
101
- #エラー2
102
-
103
- systemctl status httpd.service を打つと以下エラーが出ます。
104
-
105
-
106
-
107
- ```ここに言語を入力
108
-
109
- * httpd.service - The Apache HTTP Server
110
-
111
- Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
112
-
113
- Active: failed (Result: exit-code) since Thu 2019-10-10 16:12:11 JST; 6s ago
114
-
115
- Docs: man:httpd(8)
116
-
117
- man:apachectl(8)
118
-
119
- Process: 28847 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
120
-
121
- Process: 28846 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
122
-
123
- Main PID: 28846 (code=exited, status=1/FAILURE)
124
-
125
- ```
126
-
127
127
 
128
128
 
129
129
  よろしくお願いします。

3

ああ

2019/10/10 07:45

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -98,4 +98,32 @@
98
98
 
99
99
 
100
100
 
101
+ #エラー2
102
+
103
+ systemctl status httpd.service を打つと以下エラーが出ます。
104
+
105
+
106
+
107
+ ```ここに言語を入力
108
+
109
+ * httpd.service - The Apache HTTP Server
110
+
111
+ Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
112
+
113
+ Active: failed (Result: exit-code) since Thu 2019-10-10 16:12:11 JST; 6s ago
114
+
115
+ Docs: man:httpd(8)
116
+
117
+ man:apachectl(8)
118
+
119
+ Process: 28847 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
120
+
121
+ Process: 28846 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
122
+
123
+ Main PID: 28846 (code=exited, status=1/FAILURE)
124
+
125
+ ```
126
+
127
+
128
+
101
129
  よろしくお願いします。

2

2019/10/10 07:13

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -84,6 +84,8 @@
84
84
 
85
85
  ```ここに言語を入力
86
86
 
87
+ firewall-cmd --zone=public --add-port=12345/tcp --permanent
88
+
87
89
  sudo firewall-cmd --add-service=http --permanent
88
90
 
89
91
  sudo firewall-cmd --reload

1

12

2019/10/10 07:09

投稿

退会済みユーザー
test CHANGED
File without changes
test CHANGED
@@ -78,6 +78,22 @@
78
78
 
79
79
  ```
80
80
 
81
+ 以下も実施しています。
82
+
83
+
84
+
85
+ ```ここに言語を入力
86
+
87
+ sudo firewall-cmd --add-service=http --permanent
88
+
89
+ sudo firewall-cmd --reload
90
+
91
+ ```
92
+
93
+ #エラー
94
+
95
+ ブラウザ上でip160.160.160.160 を打っても応答時間が長すぎます。というエラーがでます
96
+
81
97
 
82
98
 
83
99
  よろしくお願いします。