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

質問編集履歴

5

httpd.conf書き足し

2018/09/26 06:23

投稿

trm
trm

スコア117

title CHANGED
File without changes
body CHANGED
@@ -118,4 +118,75 @@
118
118
  [Wed Sep 26 07:53:45.819439 2018] [cgi:error] [pid 2596] [client 2400:4050:a1:6200:d253:49ff:fe36:e025:35307] AH01215: (2)No such file or directory: exec of '/var/www/cgi-bin/b1.cgi' failed, referer: http://trm7.mydns.jp/
119
119
  [Wed Sep 26 07:53:45.831447 2018] [cgi:error] [pid 2596] [client 2400:4050:a1:6200:d253:49ff:fe36:e025:35307] End of script output before headers: b1.cgi, referer: http://trm7.mydns.jp/
120
120
  ```
121
- どこが間違っているのかご指摘よろしくお願い致します。
121
+ どこが間違っているのかご指摘よろしくお願い致します。
122
+
123
+ httpd.confの内容は以下の通りです。
124
+ ```httpd.conf
125
+ ServerRoot "/etc/httpd"
126
+ Listen 80
127
+ Include conf.modules.d/*.conf
128
+ User apache
129
+ Group apache
130
+ ServerAdmin root@trm7.mydns.jp
131
+
132
+ ServerName trm7.mydns.jp:80
133
+ <Directory />
134
+ AllowOverride all
135
+ Require all granted
136
+ </Directory>
137
+ DocumentRoot "/var/www/html"
138
+ <Directory "/var/www">
139
+ AllowOverride all
140
+ # Allow open access:
141
+ Require all granted
142
+ </Directory>
143
+ <Directory "/var/www/html">
144
+ Options FollowSymLinks
145
+ AllowOverride all
146
+ Require all granted
147
+ </Directory>
148
+ <IfModule dir_module>
149
+ DirectoryIndex index.html
150
+ </IfModule>
151
+ <Files ".ht*">
152
+ Require all denied
153
+ </Files>
154
+ <VirtualHost>
155
+ <VirtualHost>
156
+ ErrorLog "logs/error_log"
157
+ LogLevel warn
158
+ <IfModule log_config_module>
159
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
160
+ LogFormat "%h %l %u %t \"%r\" %>s %b" common
161
+
162
+ <IfModule logio_module>
163
+ # You need to enable mod_logio.c to use %I and %O
164
+ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
165
+ </IfModule>
166
+
167
+ <VirtualHost>
168
+ CustomLog "logs/access_log" combined
169
+ </IfModule>
170
+
171
+ <IfModule alias_module>
172
+ ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
173
+ </IfModule>
174
+ <Directory "/var/www/cgi-bin">
175
+ AllowOverride all
176
+ Options ExecCGI
177
+ Require all granted
178
+ </Directory>
179
+ <IfModule mime_module>
180
+ TypesConfig /etc/mime.types
181
+ AddType application/x-compress .Z
182
+ AddType application/x-gzip .gz .tgz
183
+ AddType text/html .shtml
184
+ AddOutputFilter INCLUDES .shtml
185
+ </IfModule>
186
+ AddDefaultCharset UTF-8
187
+ <IfModule mime_magic_module>
188
+ MIMEMagicFile conf/magic
189
+ </IfModule>
190
+ EnableSendfile on
191
+ IncludeOptional conf.d/*.conf
192
+ ```

4

訂正

2018/09/26 06:23

投稿

trm
trm

スコア117

title CHANGED
File without changes
body CHANGED
@@ -1,7 +1,7 @@
1
1
  index.html から b1.cgiを起動しようとするとブラウザにINTERNAL SERVER ERROR と表示されます。
2
2
 
3
3
  index.htmlは以下のコードです。
4
- ```perl
4
+ ```html
5
5
  <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
6
6
  <html>
7
7
  <head>
@@ -33,10 +33,9 @@
33
33
  b1.cgiは以下のコードです。
34
34
  ```perl
35
35
  #!/usr/bin/perl
36
- binmode(STDOUT,":utf8");
37
-
38
36
  use strict;
39
37
  use utf8;
38
+ binmode(STDOUT,":utf8");
40
39
 
41
40
  print "Content-type: text/html\n\n";
42
41
  print <<"HTML";
@@ -96,6 +95,23 @@
96
95
  </html>
97
96
  HTML
98
97
  exit;
98
+
99
+
100
+
101
+
102
+
103
+
104
+ # <tr>
105
+ # <td>このサイトについてご意見を書いて下さい</td>
106
+ # <td><textarea name="mess" cols="40" rows="5"></textarea></td>
107
+ # </tr>
108
+ #</table>
109
+ #</form>
110
+ #</body>
111
+ #</html>
112
+ #HTML
113
+ #
114
+ #exit;
99
115
  ```
100
116
  CentOS7のエラーログは以下の通りです。
101
117
  ```error_log

3

訂正

2018/09/26 05:12

投稿

trm
trm

スコア117

title CHANGED
File without changes
body CHANGED
@@ -13,7 +13,7 @@
13
13
  <font color="#ff0000"><big><big><big>現在ウェブ店舗作成中<br>ご利用までにはしばらく<br>お待ちください。<br>
14
14
  <br>
15
15
  ユーラシア(TRM出版)</big></big></big></font><font color="#ff0000"><big><big><big><br>
16
- </big></big></big></font><font color="#ffffff">年会費1,500円で本(実物商品)がネットで販売できる!販売手数料は20%、10%割引販売、他CD・DVD・ソフトウェア・ビデオゲームも販売できます!電子ファイルは年会費円でわずかな手数料だけいただきます。<br><br>
16
+ </big></big></big></font><font color="#ffffff">年会費×,×××円で本(実物商品)がネットで販売できる!販売手数料は××%、××%割引販売、他CD・DVD・ソフトウェア・ビデオゲームも販売できます!電子ファイルは年会費円で○○○○手数料だけいただきます。<br><br>
17
17
  </font><a href="http:/trm7.mydns.jp/cgi-bin/b1.cgi"><img src="http://trm7.mydns.jp/buhin/btn056_09_4.gif"
18
18
  alt="http://trm7.mydns.jp/cgi-bin/b1.cgi" width="180" height="30">
19
19
    <br>

2

訂正

2018/09/26 00:26

投稿

trm
trm

スコア117

title CHANGED
File without changes
body CHANGED
@@ -14,17 +14,17 @@
14
14
  <br>
15
15
  ユーラシア(TRM出版)</big></big></big></font><font color="#ff0000"><big><big><big><br>
16
16
  </big></big></big></font><font color="#ffffff">年会費1,500円で本(実物商品)がネットで販売できる!販売手数料は20%、10%割引販売、他CD・DVD・ソフトウェア・ビデオゲームも販売できます!電子ファイルは年会費0円でわずかな手数料だけいただきます。<br><br>
17
- </font><a href="http://127.0.0.1/cgi-bin/b1.cgi"><img src="http://127.0.0.1/buhin/btn056_09_4.gif"
17
+ </font><a href="http:/trm7.mydns.jp/cgi-bin/b1.cgi"><img src="http://trm7.mydns.jp/buhin/btn056_09_4.gif"
18
- alt="http://127.0.0.1/cgi-bin/b1.cgi" width="180" height="30">
18
+ alt="http://trm7.mydns.jp/cgi-bin/b1.cgi" width="180" height="30">
19
19
    <br>
20
- </a><a href="http://127.0.0.1/cgi-bin/b2.cgi"><img src="http://127.0.0.1/buhin/btn056_09_5.gif"
20
+ </a><a href="http://trm7.mydns.jp/cgi-bin/b2.cgi"><img src="http://trm7.mydns.jp/buhin/btn056_09_5.gif"
21
- alt="http://127.0.0.1/cgi-bin/b2.cgi" width="180" height="30">
21
+ alt="http://trm7.mydns.jp/cgi-bin/b2.cgi" width="180" height="30">
22
22
    <br>
23
- </a><a href="http://127.0.0.1/cgi-bin/60a11.cgi"><img src="http://127.0.0.1/buhin/btn056_09_6.gif"
23
+ </a><a href="http://trm7.mydns.jp/cgi-bin/60a11.cgi"><img src="http://trm7.mydns.jp/buhin/btn056_09_6.gif"
24
- alt="http://127.0.0.1/cgi-bin/60a11.cgi" width="180" height="30">
24
+ alt="http://trm7.mydns.jp/cgi-bin/60a11.cgi" width="180" height="30">
25
25
    <br>
26
- </a><a href="http://127.0.0.1/cgi-bin/c1.cgi"><img src="http://127.0.0.1/buhin/btn056_09_7.gif"
26
+ </a><a href="http://trm7.mydns.jp/cgi-bin/c1.cgi"><img src="http://trm7.mydns.jp/buhin/btn056_09_7.gif"
27
- alt="http://127.0.0.1/cgi-bin/c1.cgi" width="180" height="30">
27
+ alt="http://trm7.mydns.jp/cgi-bin/c1.cgi" width="180" height="30">
28
28
    <br>
29
29
  </a>
30
30
  </body>

1

訂正

2018/09/25 23:56

投稿

trm
trm

スコア117

title CHANGED
File without changes
body CHANGED
@@ -99,13 +99,6 @@
99
99
  ```
100
100
  CentOS7のエラーログは以下の通りです。
101
101
  ```error_log
102
- [Wed Sep 26 07:24:25.225757 2018] [cgi:error] [pid 7426] [client 2400:4050:a1:6200:d253:49ff:fe36:e025:45542] AH01215: (2)No such file or directory: exec of '/var/www/cgi-bin/b1.cgi' failed, referer: http://trm7.mydns.jp/
103
- [Wed Sep 26 07:24:25.284599 2018] [cgi:error] [pid 7426] [client 2400:4050:a1:6200:d253:49ff:fe36:e025:45542] End of script output before headers: b1.cgi, referer: http://trm7.mydns.jp/
104
- [Wed Sep 26 07:27:41.863493 2018] [suexec:notice] [pid 1331] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
105
- [Wed Sep 26 07:27:42.893711 2018] [auth_digest:notice] [pid 1331] AH01757: generating secret for digest authentication ...
106
- [Wed Sep 26 07:27:42.894600 2018] [lbmethod_heartbeat:notice] [pid 1331] AH02282: No slotmem from mod_heartmonitor
107
- [Wed Sep 26 07:27:42.902731 2018] [mpm_prefork:notice] [pid 1331] AH00163: Apache/2.4.6 (CentOS) mod_auth_kerb/5.4 mod_nss/2.4.6 NSS/3.15.4 Basic ECC mod_wsgi/3.4 Python/2.7.5 configured -- resuming normal operations
108
- [Wed Sep 26 07:27:42.902768 2018] [core:notice] [pid 1331] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
109
102
  [Wed Sep 26 07:53:45.819439 2018] [cgi:error] [pid 2596] [client 2400:4050:a1:6200:d253:49ff:fe36:e025:35307] AH01215: (2)No such file or directory: exec of '/var/www/cgi-bin/b1.cgi' failed, referer: http://trm7.mydns.jp/
110
103
  [Wed Sep 26 07:53:45.831447 2018] [cgi:error] [pid 2596] [client 2400:4050:a1:6200:d253:49ff:fe36:e025:35307] End of script output before headers: b1.cgi, referer: http://trm7.mydns.jp/
111
104
  ```