質問編集履歴

15

誤字訂正

2018/09/19 13:15

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」とエラー表示されます。/var/www/cgi-bin/60a11.cgiが存在するにも関わらずです。Apacheも起動し chmod 700 /var/www/cgi-bin/60a11.cgi も実行しました。
4
4
 
5
-  実行方法は、まずはFireFoxで /var/www/html/index.htmlを「http://127.0.0.1/」とURLを指定して開きindex.html内にあるボタンを押し“http://127.0.0.1/var/www/cgi-bin/60a11.cgi”を開こうとすると「60a11.cgi」は表示されずにエラーメッセージが出る、というところです。ドキュメントルートは /war/www/html です。
5
+  実行方法は、まずはFireFoxで /var/www/html/index.htmlを「http://127.0.0.1/」とURLを指定して開きindex.html内にあるボタンを押し“http://127.0.0.1/var/www/cgi-bin/60a11.cgi”を開こうとすると「60a11.cgi」は表示されずにエラーメッセージが出る、というところです。ドキュメントルートは /var/www/html です。
6
6
 
7
7
 
8
8
 

14

訂正

2018/09/19 13:15

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -56,7 +56,7 @@
56
56
 
57
57
 
58
58
 
59
- perlの次に実行しようとしている「a6011.cgi」のコードです。
59
+ perlの次に実行しようとしている「60a11.cgi」のコードです。
60
60
 
61
61
  ```perl
62
62
 

13

修正

2018/07/03 05:26

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -226,12 +226,40 @@
226
226
 
227
227
  実行したときのerror_logです。
228
228
 
229
+ ```error_log
230
+
231
+
232
+
233
+ [Tue Jul 03 02:52:49.352453 2018] [core:error] [pid 4850] (13)Permission denied: [client 127.0.0.1:60556] AH00035: access to /buhin/btn056_09_6.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
234
+
235
+ [Tue Jul 03 02:52:49.394916 2018] [core:error] [pid 4846] (13)Permission denied: [client 127.0.0.1:60555] AH00035: access to /buhin/btn056_09_5.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
236
+
237
+ [Tue Jul 03 02:52:49.384311 2018] [core:error] [pid 4880] (13)Permission denied: [client 127.0.0.1:60554] AH00035: access to /buhin/btn056_09_4.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
238
+
239
+ [Tue Jul 03 02:52:49.407106 2018] [core:error] [pid 4852] (13)Permission denied: [client 127.0.0.1:60557] AH00035: access to /buhin/btn056_09_7.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
240
+
241
+ [Tue Jul 03 02:52:55.165134 2018] [mime_magic:error] [pid 4882] [client 127.0.0.1:60558] AH01512: mod_mime_magic: can't read `/var/www/cgi-bin/60a11.cgi', referer: http://127.0.0.1/
242
+
243
+ [Tue Jul 03 02:52:55.301730 2018] [cgi:error] [pid 4882] [client 127.0.0.1:60558] AH01215: (13)Permission denied: exec of '/var/www/cgi-bin/60a11.cgi' failed, referer: http://127.0.0.1/
244
+
245
+ [Tue Jul 03 02:52:55.316256 2018] [cgi:error] [pid 4882] [client 127.0.0.1:60558] End of script output before headers: 60a11.cgi, referer: http://127.0.0.1/
246
+
247
+ [Tue Jul 03 02:56:58.496028 2018] [core:error] [pid 4881] (13)Permission denied: [client 127.0.0.1:60571] AH00035: access to /buhin/btn056_09_6.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
248
+
249
+ [Tue Jul 03 02:56:58.539093 2018] [core:error] [pid 4848] (13)Permission denied: [client 127.0.0.1:60570] AH00035: access to /buhin/btn056_09_5.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
250
+
251
+ [Tue Jul 03 02:56:58.553854 2018] [core:error] [pid 4885] (13)Permission denied: [client 127.0.0.1:60569] AH00035: access to /buhin/btn056_09_4.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
252
+
253
+ [Tue Jul 03 02:56:58.892290 2018] [core:error] [pid 4883] (13)Permission denied: [client 127.0.0.1:60572] AH00035: access to /buhin/btn056_09_7.gif denied (filesystem path '/var/www/html/buhin') because search permissions are missing on a component of the path, referer: http://127.0.0.1/
254
+
255
+ [Tue Jul 03 02:57:06.890120 2018] [mime_magic:error] [pid 4884] [client 127.0.0.1:60573] AH01512: mod_mime_magic: can't read `/var/www/cgi-bin/60a11.cgi', referer: http://127.0.0.1/
256
+
257
+ [Tue Jul 03 02:57:06.914866 2018] [cgi:error] [pid 4884] [client 127.0.0.1:60573] AH01215: (13)Permission denied: exec of '/var/www/cgi-bin/60a11.cgi' failed, referer: http://127.0.0.1/
258
+
259
+ [Tue Jul 03 02:57:06.920432 2018] [cgi:error] [pid 4884] [client 127.0.0.1:60573] End of script output before headers: 60a11.cgi, referer: http://127.0.0.1/
260
+
229
261
  ```
230
262
 
231
- [Tue Jul 03 02:57:06.920432 2018] [cgi:error] [pid 4884] [client 127.0.0.1:60573] End of script output before headers: 60a11.cgi, referer: http://127.0.0.1/
232
-
233
- ```
234
-
235
263
 
236
264
 
237
265
  解決策よろしくお願い致します。

12

修正

2018/07/03 01:25

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -56,18 +56,18 @@
56
56
 
57
57
 
58
58
 
59
- ```perlの次に実行しようとしている「a6011.cgi」のコードです。
59
+ perlの次に実行しようとしている「a6011.cgi」のコードです。
60
+
61
+ ```perl
60
62
 
61
63
  #!/usr/bin/perl
62
64
 
65
+ use strict;
66
+
67
+ use utf8;
68
+
63
69
 
64
70
 
65
- use strict;
66
-
67
- use utf8;
68
-
69
-
70
-
71
71
  print "Content-type: text/html\n\n";
72
72
 
73
73
  print <<"HTML";
@@ -224,7 +224,9 @@
224
224
 
225
225
  ```
226
226
 
227
- ```実行したときのerror_logです。
227
+ 実行したときのerror_logです。
228
+
229
+ ```
228
230
 
229
231
  [Tue Jul 03 02:57:06.920432 2018] [cgi:error] [pid 4884] [client 127.0.0.1:60573] End of script output before headers: 60a11.cgi, referer: http://127.0.0.1/
230
232
 

11

情報追加

2018/07/03 00:33

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -52,163 +52,183 @@
52
52
 
53
53
  ```
54
54
 
55
-
56
-
57
-
58
-
59
- ```httpd.conf
60
-
61
- #(以下は変更しました無視してかまいません)
62
-
63
- ServerRoot "/etc/httpd"
64
-
65
- Listen 80
66
-
67
- Include conf.modules.d/*.conf
68
-
69
- User apache
70
-
71
- Group apache
72
-
73
- ServerAdmin root@trm7.mydns.jp
74
-
75
- ServerName trm7.mydns.jp:80
76
-
77
- <Directory />
78
-
79
- AllowOverride none
80
-
81
- Require all denied
82
-
83
- </Directory>
84
-
85
- DocumentRoot "/var/www/html"
86
-
87
- <Directory "/var/www">
88
-
89
- AllowOverride None
90
-
91
- # Allow open access:
92
-
93
- Require all granted
94
-
95
- </Directory>
96
-
97
- <Directory "/var/www/html">
98
-
99
- Options FollowSymLinks
100
-
101
- Options +ExecCGI
102
-
103
- AddHandler cgi-script .cgi
104
-
105
- AllowOverride None
106
-
107
- Require all granted
108
-
109
- </Directory>
110
-
111
- <IfModule dir_module>
112
-
113
- DirectoryIndex index.html
114
-
115
- </IfModule>
116
-
117
- <Files ".ht*">
118
-
119
- Require all denied
120
-
121
- </Files>
122
-
123
- ErrorLog "logs/error_log"
124
-
125
- LogLevel warn
126
-
127
-
128
-
129
- <IfModule log_config_module>
130
-
131
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
132
-
133
- LogFormat "%h %l %u %t \"%r\" %>s %b" common
134
-
135
-
136
-
137
- <IfModule logio_module>
138
-
139
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
140
-
141
- </IfModule>
142
-
143
- CustomLog "logs/access_log" combined
144
-
145
- </IfModule>
146
-
147
- <IfModule alias_module>
148
-
149
- ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
150
-
151
-
152
-
153
- </IfModule>
154
-
155
-
156
-
157
- ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
158
-
159
-
160
-
161
- <Directory "/var/www/cgi-bin">
162
-
163
- Options +ExecCGI
164
-
165
- Addhandler cgi-script .cgi .pl
166
-
167
- </Directory>
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
- <IfModule mime_module>
180
-
181
- TypesConfig /etc/mime.types
182
-
183
- AddType application/x-compress .Z
184
-
185
- AddType application/x-gzip .gz .tgz
186
-
187
- AddType text/html .shtml
188
-
189
- AddOutputFilter INCLUDES .shtml
190
-
191
- </IfModule>
192
-
193
- AddDefaultCharset UTF-8
194
-
195
-
196
-
197
- <IfModule mime_magic_module>
198
-
199
- MIMEMagicFile conf/magic
200
-
201
- </IfModule>
202
-
203
- EnableSendfile on
204
-
205
- IncludeOptional conf.d/*.conf
206
-
207
-
55
+ そこで気がかりなのが「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」というエラーメッセージが出るところです。じっさいには60a11.cgiは存在するのにこの表示が出ます。
56
+
57
+
58
+
59
+ ```perlの次に実行しようとしている「a6011.cgi」のコードです。
60
+
61
+ #!/usr/bin/perl
62
+
63
+
64
+
65
+ use strict;
66
+
67
+ use utf8;
68
+
69
+
70
+
71
+ print "Content-type: text/html\n\n";
72
+
73
+ print <<"HTML";
74
+
75
+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
76
+
77
+ <html>
78
+
79
+ <head>
80
+
81
+ <title>ユーザーアカウント登録</title>
82
+
83
+ </head>
84
+
85
+ <body bgcolor="#000066" text="#000000" link="#0000ee" alink="#0000ee"
86
+
87
+ vlink="#551a8b">
88
+
89
+ <form method="post" form action="67b32.cgi" ENCTYPE="multipart/form-data">
90
+
91
+ <form>
92
+
93
+ <table border="0">
94
+
95
+ <tbody>
96
+
97
+ <table>
98
+
99
+ <tr>
100
+
101
+ <td><font color="#ff0000"><label for="ID">希望ユーザーID</label></font></td>
102
+
103
+ <td><input type="text" name="ID" size="40" maxlength="30"><br></td>
104
+
105
+ </tr><tr>
106
+
107
+ <td><font color="#ff0000"><label for="pass">希望パスワード</label></font></td>
108
+
109
+ <td><input type="password" name="pass" size="40" maxlength="30"><br></td>
110
+
111
+ </tr><tr>
112
+
113
+ <td><font color="#ff0000"><label for="pass2">パスワード確認</label></font></td>
114
+
115
+ <td><input type="password" name="pass2" size="40" maxlength="30"><br></td>
116
+
117
+ </tr><tr>
118
+
119
+ <td><font color="#ff0000"><label for="shimei">氏名</label></font></td>
120
+
121
+ <td><input type="text" name="shimei" size="40" maxlength="30"><br></td>
122
+
123
+ </tr><tr>
124
+
125
+ <td><font color="#ff0000"><label for="kaisyamei">会社名</label></font></td>
126
+
127
+ <td><input type="text" name="kaisyamei" size="40" maxlength="30"><br></td>
128
+
129
+ </tr><tr>
130
+
131
+ <td><font color="#ff0000"><label for="mail">メールアドレス</label></font></td>
132
+
133
+ <td><input type=""text"" name="mail" size="40" maxlength="30"><br></td>
134
+
135
+ </tr><tr>
136
+
137
+ <td><font color="#ff0000"><label for="syouhinmei">商品名</label></font></td>
138
+
139
+ <td><input type="text" name="syouhinmei" size="40" maxlength="30"><br></td>
140
+
141
+ </tr><tr>
142
+
143
+ <td><font color="#ff0000"><label for="nedan">商品値段</label></font></td>
144
+
145
+ <td><input type="text" name="nedan" size="40" maxlength="30"><br></td>
146
+
147
+ </tr><tr>
148
+
149
+ <td><font color="#ff0000"><label for="q1">商品カテゴリー</label></font></td>
150
+
151
+ <td><input type="radio" name="q1" value="【書籍(実物商品)】"><font color="#ff0000">書籍</font>
152
+
153
+ <input type="radio" name="q1" value="【CD(実物商品)】"><font color="#ff0000">CD</font>
154
+
155
+ <input type="radio" name="q1" value="【DVD(実物商品)】"><font color="#ff0000">DVD</font>
156
+
157
+ <input type="radio" name="q1" value="【ソフトウェア(実物商品)】"><font color="#ff0000">
158
+
159
+ ソフトウェア(実物)</font>
160
+
161
+ <input type="radio" name="q1" value="【ビデオゲーム(実物商品)】"><font color="#ff0000">ビデオゲーム(実物)</font>
162
+
163
+ <input type="radio" name="q1" value="【電子書籍(電子ファイル)】"><font color="#ff0000">電子書籍</font>
164
+
165
+ <input type="radio" name="q1" value="【ソフトウェア(電子ファイル)】"><font color="#ff0000">ソフトウェア(電子ファイル)</font>
166
+
167
+ <input type="radio" name="q1" value="【音楽(電子ファイル)】"><font color="#ff0000">音楽(電子ファイル)</font>
168
+
169
+ <input type="radio" name="q1" value="【ビデオゲーム(電子ファイル)】"><font color="#ff0000">ビデオゲーム(電子ファイル)</font>
170
+
171
+ <input type="radio" name="q1" value="【動画(電子ファイル)】"><font color="#ff0000">動画(電子ファイル)</font><br></td>
172
+
173
+ </tr><tr>
174
+
175
+ <td><font color="#ff0000">ファイル1:画像ファイル(jpg/gif/png/bmpファイル)<br>ファイル2:中身立ち読みファイル(pdfファイル)(無い人はアップロードする必要はありません)<br>ファイル3:売り物となるコンテンツ(実物商品を扱う場合はアップロードする必要はありません)をアップロードしてください</font><br></td>
176
+
177
+ </tr><tr>
178
+
179
+ <td><font color="#ff0000">ファイル1を選択:</font></td>
180
+
181
+ <td><font color="#ff0000"><input type="file" name="file1"></font><br></td>
182
+
183
+ </tr><tr>
184
+
185
+ <td><font color="#ff0000">ファイル2を選択:</font></td>
186
+
187
+ <td><font color="#ff0000"><input type="file" name="file2"></font><br></td>
188
+
189
+ </tr><tr>
190
+
191
+ <td><font color="#ff0000">ファイル3を選択:</font></td>
192
+
193
+ <td><font color="#ff0000"><input type="file" name="file3"></font><br></td>
194
+
195
+ </tr><tr>
196
+
197
+ <td><textarea name="mojijouhou" rows="4" cols="40">商品情報をご記入ください。</textarea><br></td>
198
+
199
+ </tr><tr>
200
+
201
+ <td><input type="submit" onclick="location.href'67b32.cgi'" value="送信">
202
+
203
+ <input type="reset" value="リセット"></td>
204
+
205
+ </tr>
206
+
207
+ </table>
208
+
209
+ </tbody>
210
+
211
+ </form>
212
+
213
+ <br>
214
+
215
+ <br>
216
+
217
+ </body>
218
+
219
+ </html>
220
+
221
+ HTML
222
+
223
+ exit;
208
224
 
209
225
  ```
210
226
 
227
+ ```実行したときのerror_logです。
228
+
211
- そこで気がかりなのが「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」というエラーメッセージが出るところです。じっさいには60a11.cgiは存在するのにこの表示が出ます。
229
+ [Tue Jul 03 02:57:06.920432 2018] [cgi:error] [pid 4884] [client 127.0.0.1:60573] End of script output before headers: 60a11.cgi, referer: http://127.0.0.1/
230
+
231
+ ```
212
232
 
213
233
 
214
234
 

10

変更

2018/07/03 00:23

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -56,7 +56,9 @@
56
56
 
57
57
 
58
58
 
59
+ ```httpd.conf
60
+
59
- ```httpd.conf(以下は変更しました無視してかまいません)
61
+ #(以下は変更しました無視してかまいません)
60
62
 
61
63
  ServerRoot "/etc/httpd"
62
64
 

9

変更

2018/06/25 08:14

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,9 @@
48
48
 
49
49
  # Require all granted
50
50
 
51
- #</Directory>```
51
+ #</Directory>
52
+
53
+ ```
52
54
 
53
55
 
54
56
 

8

変更

2018/06/25 08:12

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -16,178 +16,194 @@
16
16
 
17
17
  ```httpd.conf
18
18
 
19
- <Directory "/var/www/html/cgi-bin">
20
-
21
- Options FollowSymLinks
22
-
23
- Options +ExecCGI
24
-
25
- AddHandler cgi-script .cgi
26
-
27
- AllowOverride None
28
-
29
- Options None
30
-
31
- Require all granted
32
-
33
- </Directory>
19
+ <Directory "/var/www/cgi-bin">
20
+
21
+ Options FollowSymLinks
22
+
23
+ Options +ExecCGI
24
+
25
+ AddHandler cgi-script .cgi
26
+
27
+ AllowOverride None
28
+
29
+ # Options None
30
+
31
+ Require all granted
32
+
33
+ </Directory>
34
+
35
+
36
+
37
+ #<Directory "/var/www/html/cgi-bin">
38
+
39
+ #Options FollowSymLinks
40
+
41
+ #Options +ExecCGI
42
+
43
+ #AddHandler cgi-script .cgi
44
+
45
+ # AllowOverride None
46
+
47
+ # Options None
48
+
49
+ # Require all granted
50
+
51
+ #</Directory>```
52
+
53
+
54
+
55
+
56
+
57
+ ```httpd.conf(以下は変更しました無視してかまいません)
58
+
59
+ ServerRoot "/etc/httpd"
60
+
61
+ Listen 80
62
+
63
+ Include conf.modules.d/*.conf
64
+
65
+ User apache
66
+
67
+ Group apache
68
+
69
+ ServerAdmin root@trm7.mydns.jp
70
+
71
+ ServerName trm7.mydns.jp:80
72
+
73
+ <Directory />
74
+
75
+ AllowOverride none
76
+
77
+ Require all denied
78
+
79
+ </Directory>
80
+
81
+ DocumentRoot "/var/www/html"
82
+
83
+ <Directory "/var/www">
84
+
85
+ AllowOverride None
86
+
87
+ # Allow open access:
88
+
89
+ Require all granted
90
+
91
+ </Directory>
92
+
93
+ <Directory "/var/www/html">
94
+
95
+ Options FollowSymLinks
96
+
97
+ Options +ExecCGI
98
+
99
+ AddHandler cgi-script .cgi
100
+
101
+ AllowOverride None
102
+
103
+ Require all granted
104
+
105
+ </Directory>
106
+
107
+ <IfModule dir_module>
108
+
109
+ DirectoryIndex index.html
110
+
111
+ </IfModule>
112
+
113
+ <Files ".ht*">
114
+
115
+ Require all denied
116
+
117
+ </Files>
118
+
119
+ ErrorLog "logs/error_log"
120
+
121
+ LogLevel warn
122
+
123
+
124
+
125
+ <IfModule log_config_module>
126
+
127
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
128
+
129
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
130
+
131
+
132
+
133
+ <IfModule logio_module>
134
+
135
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
136
+
137
+ </IfModule>
138
+
139
+ CustomLog "logs/access_log" combined
140
+
141
+ </IfModule>
142
+
143
+ <IfModule alias_module>
144
+
145
+ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
146
+
147
+
148
+
149
+ </IfModule>
150
+
151
+
152
+
153
+ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
154
+
155
+
156
+
157
+ <Directory "/var/www/cgi-bin">
158
+
159
+ Options +ExecCGI
160
+
161
+ Addhandler cgi-script .cgi .pl
162
+
163
+ </Directory>
164
+
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+ <IfModule mime_module>
176
+
177
+ TypesConfig /etc/mime.types
178
+
179
+ AddType application/x-compress .Z
180
+
181
+ AddType application/x-gzip .gz .tgz
182
+
183
+ AddType text/html .shtml
184
+
185
+ AddOutputFilter INCLUDES .shtml
186
+
187
+ </IfModule>
188
+
189
+ AddDefaultCharset UTF-8
190
+
191
+
192
+
193
+ <IfModule mime_magic_module>
194
+
195
+ MIMEMagicFile conf/magic
196
+
197
+ </IfModule>
198
+
199
+ EnableSendfile on
200
+
201
+ IncludeOptional conf.d/*.conf
202
+
203
+
34
204
 
35
205
  ```
36
206
 
37
-
38
-
39
-
40
-
41
- ```httpd.conf(以下は変更しました無視してかまいません)
42
-
43
- ServerRoot "/etc/httpd"
44
-
45
- Listen 80
46
-
47
- Include conf.modules.d/*.conf
48
-
49
- User apache
50
-
51
- Group apache
52
-
53
- ServerAdmin root@trm7.mydns.jp
54
-
55
- ServerName trm7.mydns.jp:80
56
-
57
- <Directory />
58
-
59
- AllowOverride none
60
-
61
- Require all denied
62
-
63
- </Directory>
64
-
65
- DocumentRoot "/var/www/html"
66
-
67
- <Directory "/var/www">
68
-
69
- AllowOverride None
70
-
71
- # Allow open access:
72
-
73
- Require all granted
74
-
75
- </Directory>
76
-
77
- <Directory "/var/www/html">
78
-
79
- Options FollowSymLinks
80
-
81
- Options +ExecCGI
82
-
83
- AddHandler cgi-script .cgi
84
-
85
- AllowOverride None
86
-
87
- Require all granted
88
-
89
- </Directory>
90
-
91
- <IfModule dir_module>
92
-
93
- DirectoryIndex index.html
94
-
95
- </IfModule>
96
-
97
- <Files ".ht*">
98
-
99
- Require all denied
100
-
101
- </Files>
102
-
103
- ErrorLog "logs/error_log"
104
-
105
- LogLevel warn
106
-
107
-
108
-
109
- <IfModule log_config_module>
110
-
111
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
112
-
113
- LogFormat "%h %l %u %t \"%r\" %>s %b" common
114
-
115
-
116
-
117
- <IfModule logio_module>
118
-
119
- LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
120
-
121
- </IfModule>
122
-
123
- CustomLog "logs/access_log" combined
124
-
125
- </IfModule>
126
-
127
- <IfModule alias_module>
128
-
129
- ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
130
-
131
-
132
-
133
- </IfModule>
134
-
135
-
136
-
137
- ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
138
-
139
-
140
-
141
- <Directory "/var/www/cgi-bin">
142
-
143
- Options +ExecCGI
144
-
145
- Addhandler cgi-script .cgi .pl
146
-
147
- </Directory>
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
- <IfModule mime_module>
160
-
161
- TypesConfig /etc/mime.types
162
-
163
- AddType application/x-compress .Z
164
-
165
- AddType application/x-gzip .gz .tgz
166
-
167
- AddType text/html .shtml
168
-
169
- AddOutputFilter INCLUDES .shtml
170
-
171
- </IfModule>
172
-
173
- AddDefaultCharset UTF-8
174
-
175
-
176
-
177
- <IfModule mime_magic_module>
178
-
179
- MIMEMagicFile conf/magic
180
-
181
- </IfModule>
182
-
183
- EnableSendfile on
184
-
185
- IncludeOptional conf.d/*.conf
186
-
187
-
188
-
189
- ```
190
-
191
207
  そこで気がかりなのが「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」というエラーメッセージが出るところです。じっさいには60a11.cgiは存在するのにこの表示が出ます。
192
208
 
193
209
 

7

情報付加

2018/06/25 08:11

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -15,6 +15,30 @@
15
15
 
16
16
 
17
17
  ```httpd.conf
18
+
19
+ <Directory "/var/www/html/cgi-bin">
20
+
21
+ Options FollowSymLinks
22
+
23
+ Options +ExecCGI
24
+
25
+ AddHandler cgi-script .cgi
26
+
27
+ AllowOverride None
28
+
29
+ Options None
30
+
31
+ Require all granted
32
+
33
+ </Directory>
34
+
35
+ ```
36
+
37
+
38
+
39
+
40
+
41
+ ```httpd.conf(以下は変更しました無視してかまいません)
18
42
 
19
43
  ServerRoot "/etc/httpd"
20
44
 

6

語句の修正

2018/06/25 06:24

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -164,7 +164,7 @@
164
164
 
165
165
  ```
166
166
 
167
- そこで気がかりなのが「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」というエラーメッセージが出るところです。じっさいには60a11.cgiは存在するのにこの表示が出ます。
167
+ そこで気がかりなのが「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」というエラーメッセージが出るところです。じっさいには60a11.cgiは存在するのにこの表示が出ます。
168
168
 
169
169
 
170
170
 

5

気になる点を追記

2018/06/24 18:12

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -164,29 +164,7 @@
164
164
 
165
165
  ```
166
166
 
167
-
167
+ そこで気がかりなのが「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」というエラーメッセージが出るところです。じsっさいには60a11.cgiは存在するのにこの表示が出ます。
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
-
189
-
190
168
 
191
169
 
192
170
 

4

新たな情報付加

2018/06/24 18:07

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -10,4 +10,184 @@
10
10
 
11
11
 
12
12
 
13
+ httpd.confの設定は以下の通りです。
14
+
15
+
16
+
17
+ ```httpd.conf
18
+
19
+ ServerRoot "/etc/httpd"
20
+
21
+ Listen 80
22
+
23
+ Include conf.modules.d/*.conf
24
+
25
+ User apache
26
+
27
+ Group apache
28
+
29
+ ServerAdmin root@trm7.mydns.jp
30
+
31
+ ServerName trm7.mydns.jp:80
32
+
33
+ <Directory />
34
+
35
+ AllowOverride none
36
+
37
+ Require all denied
38
+
39
+ </Directory>
40
+
41
+ DocumentRoot "/var/www/html"
42
+
43
+ <Directory "/var/www">
44
+
45
+ AllowOverride None
46
+
47
+ # Allow open access:
48
+
49
+ Require all granted
50
+
51
+ </Directory>
52
+
53
+ <Directory "/var/www/html">
54
+
55
+ Options FollowSymLinks
56
+
57
+ Options +ExecCGI
58
+
59
+ AddHandler cgi-script .cgi
60
+
61
+ AllowOverride None
62
+
63
+ Require all granted
64
+
65
+ </Directory>
66
+
67
+ <IfModule dir_module>
68
+
69
+ DirectoryIndex index.html
70
+
71
+ </IfModule>
72
+
73
+ <Files ".ht*">
74
+
75
+ Require all denied
76
+
77
+ </Files>
78
+
79
+ ErrorLog "logs/error_log"
80
+
81
+ LogLevel warn
82
+
83
+
84
+
85
+ <IfModule log_config_module>
86
+
87
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
88
+
89
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
90
+
91
+
92
+
93
+ <IfModule logio_module>
94
+
95
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
96
+
97
+ </IfModule>
98
+
99
+ CustomLog "logs/access_log" combined
100
+
101
+ </IfModule>
102
+
103
+ <IfModule alias_module>
104
+
105
+ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
106
+
107
+
108
+
109
+ </IfModule>
110
+
111
+
112
+
113
+ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
114
+
115
+
116
+
117
+ <Directory "/var/www/cgi-bin">
118
+
119
+ Options +ExecCGI
120
+
121
+ Addhandler cgi-script .cgi .pl
122
+
123
+ </Directory>
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+ <IfModule mime_module>
136
+
137
+ TypesConfig /etc/mime.types
138
+
139
+ AddType application/x-compress .Z
140
+
141
+ AddType application/x-gzip .gz .tgz
142
+
143
+ AddType text/html .shtml
144
+
145
+ AddOutputFilter INCLUDES .shtml
146
+
147
+ </IfModule>
148
+
149
+ AddDefaultCharset UTF-8
150
+
151
+
152
+
153
+ <IfModule mime_magic_module>
154
+
155
+ MIMEMagicFile conf/magic
156
+
157
+ </IfModule>
158
+
159
+ EnableSendfile on
160
+
161
+ IncludeOptional conf.d/*.conf
162
+
163
+
164
+
165
+ ```
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+
190
+
191
+
192
+
13
193
  解決策よろしくお願い致します。

3

修正

2018/06/22 13:34

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -1,6 +1,6 @@
1
1
  CentOS7でPerlを実行しようとしても実行できません。CGIは/var/www/cgi-bin/ で実行可能であるということでそこに置きましたが、実行すると、
2
2
 
3
- 「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」とエラー表示されます。/var/www/cgi-bin/60a11.cgiが存在するにも関わらずです。Apacheも起動し chmod 700 /var/www/cgi-bin/60a11.cgi も実行しました。
3
+ 「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」とエラー表示されます。/var/www/cgi-bin/60a11.cgiが存在するにも関わらずです。Apacheも起動し chmod 700 /var/www/cgi-bin/60a11.cgi も実行しました。
4
4
 
5
5
   実行方法は、まずはFireFoxで /var/www/html/index.htmlを「http://127.0.0.1/」とURLを指定して開きindex.html内にあるボタンを押し“http://127.0.0.1/var/www/cgi-bin/60a11.cgi”を開こうとすると「60a11.cgi」は表示されずにエラーメッセージが出る、というところです。ドキュメントルートは /war/www/html です。
6
6
 

2

問題が解決されなかった旨

2018/06/22 04:20

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -2,4 +2,12 @@
2
2
 
3
3
  「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」とエラー表示されます。/var/www/cgi-bin/60a11.cgiが存在するにも関わらずです。Apacheも起動し chmod 700 /var/www/cgi-bin/60a11.cgi も実行しました。
4
4
 
5
-  実行方法は、まずはFireFoxで /var/www/html/index.htmlを「http://127.0.0.1/」とURLを指定して開きindex.html内にあるボタンを押し“http://127.0.0.1/var/www/cgi-bin/60a11.cgi”を開こうとすると「60a11.cgi」は表示されずにエラーメッセージが出る、というところです。解決策よろしくお願い致します。
5
+  実行方法は、まずはFireFoxで /var/www/html/index.htmlを「http://127.0.0.1/」とURLを指定して開きindex.html内にあるボタンを押し“http://127.0.0.1/var/www/cgi-bin/60a11.cgi”を開こうとすると「60a11.cgi」は表示されずにエラーメッセージが出る、というところです。ドキュメントルートは /war/www/html です。
6
+
7
+
8
+
9
+  ご回答がありました、ありがとうございました。しかし、cgi-bin を html配下に置いても問題は解決されませんでした。
10
+
11
+
12
+
13
+ 解決策よろしくお願い致します。

1

詳細記述

2018/06/22 03:58

投稿

trm
trm

スコア117

test CHANGED
File without changes
test CHANGED
@@ -1,3 +1,5 @@
1
- CentOS7でPerlを実行しようとしても実行できません。cgiは/var/www/cgi-bin/ で実行可能であるということでそこに置きましたが、実行すると、
1
+ CentOS7でPerlを実行しようとしても実行できません。CGIは/var/www/cgi-bin/ で実行可能であるということでそこに置きましたが、実行すると、
2
2
 
3
- 「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on htis server」と表示されます。/var/www/cgi-bin/60a11.cgiが存在するにも関わらずです。Apacheも起動し chmod 700 /var/www/cgi-bin/60a11.cgi も実行しました。解決策よろしくお願い致します。
3
+ 「Not Found The requested URL /var/www/cgi-bin/60a11.cgi was not found on this server.」とエラー表示されます。/var/www/cgi-bin/60a11.cgiが存在するにも関わらずです。Apacheも起動し chmod 700 /var/www/cgi-bin/60a11.cgi も実行しました。
4
+
5
+  実行方法は、まずはFireFoxで /var/www/html/index.htmlを「http://127.0.0.1/」とURLを指定して開きindex.html内にあるボタンを押し“http://127.0.0.1/var/www/cgi-bin/60a11.cgi”を開こうとすると「60a11.cgi」は表示されずにエラーメッセージが出る、というところです。解決策よろしくお願い致します。