質問編集履歴
3
phpファイル追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -14,6 +14,18 @@
|
|
14
14
|
|
15
15
|
phpもインストール済みです
|
16
16
|
|
17
|
+
phpファイルのコード
|
18
|
+
|
19
|
+
```
|
20
|
+
|
21
|
+
<?php
|
22
|
+
|
23
|
+
phpinfo();
|
24
|
+
|
25
|
+
?>
|
26
|
+
|
27
|
+
```
|
28
|
+
|
17
29
|
|
18
30
|
|
19
31
|
```
|
2
httpd.conf 追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -52,9 +52,11 @@
|
|
52
52
|
|
53
53
|
|
54
54
|
|
55
|
-
httpd.conf
|
55
|
+
httpd.conf
|
56
|
+
|
56
|
-
|
57
|
+
```
|
58
|
+
|
57
|
-
|
59
|
+
ServerRoot "/usr/local/opt/httpd"
|
58
60
|
|
59
61
|
Listen 8080
|
60
62
|
|
@@ -72,6 +74,8 @@
|
|
72
74
|
|
73
75
|
LoadModule authz_user_module lib/httpd/modules/mod_authz_user.so
|
74
76
|
|
77
|
+
LoadModule authz_core_module lib/httpd/modules/mod_authz_core.so
|
78
|
+
|
75
79
|
LoadModule access_compat_module lib/httpd/modules/mod_access_compat.so
|
76
80
|
|
77
81
|
LoadModule auth_basic_module lib/httpd/modules/mod_auth_basic.so
|
@@ -100,12 +104,194 @@
|
|
100
104
|
|
101
105
|
LoadModule php7_module /usr/libexec/apache2/libphp7.so
|
102
106
|
|
107
|
+
<IfModule !mpm_prefork_module>
|
108
|
+
|
109
|
+
#LoadModule cgid_module lib/httpd/modules/mod_cgid.so
|
110
|
+
|
111
|
+
</IfModule>
|
112
|
+
|
113
|
+
<IfModule mpm_prefork_module>
|
114
|
+
|
115
|
+
#LoadModule cgi_module lib/httpd/modules/mod_cgi.so
|
116
|
+
|
117
|
+
</IfModule>
|
118
|
+
|
103
119
|
LoadModule dir_module lib/httpd/modules/mod_dir.so
|
104
120
|
|
105
121
|
LoadModule alias_module lib/httpd/modules/mod_alias.so
|
106
122
|
|
107
123
|
|
108
124
|
|
125
|
+
<IfModule unixd_module>
|
126
|
+
|
127
|
+
User _www
|
128
|
+
|
129
|
+
Group _www
|
130
|
+
|
131
|
+
</IfModule>
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
|
136
|
+
|
137
|
+
ServerAdmin you@example.com
|
138
|
+
|
139
|
+
ServerName www.example.com:8080
|
140
|
+
|
141
|
+
<Directory />
|
142
|
+
|
143
|
+
AllowOverride none
|
144
|
+
|
145
|
+
Require all denied
|
146
|
+
|
147
|
+
</Directory>
|
148
|
+
|
149
|
+
DocumentRoot "/usr/local/var/www"
|
150
|
+
|
151
|
+
<Directory "/usr/local/var/www">
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
Options Indexes FollowSymLinks
|
156
|
+
|
157
|
+
AllowOverride None
|
158
|
+
|
159
|
+
Require all granted
|
160
|
+
|
161
|
+
</Directory>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
<IfModule dir_module>
|
166
|
+
|
167
|
+
DirectoryIndex index.html index.php
|
168
|
+
|
169
|
+
</IfModule>
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
<Files ".ht*">
|
174
|
+
|
175
|
+
Require all denied
|
176
|
+
|
177
|
+
</Files>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
ErrorLog "/usr/local/var/log/httpd/error_log"
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
LogLevel warn
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
<IfModule log_config_module>
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
194
|
+
|
195
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
196
|
+
|
197
|
+
|
198
|
+
|
199
|
+
<IfModule logio_module>
|
200
|
+
|
201
|
+
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
202
|
+
|
203
|
+
</IfModule>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
CustomLog "/usr/local/var/log/httpd/access_log" common
|
208
|
+
|
209
|
+
</IfModule>
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
<IfModule alias_module>
|
214
|
+
|
215
|
+
ScriptAlias /cgi-bin/ "/usr/local/var/www/cgi-bin/"
|
216
|
+
|
217
|
+
</IfModule>
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
<IfModule cgid_module>
|
222
|
+
|
223
|
+
#
|
224
|
+
|
225
|
+
# ScriptSock: On threaded servers, designate the path to the UNIX
|
226
|
+
|
227
|
+
# socket used to communicate with the CGI daemon of mod_cgid.
|
228
|
+
|
229
|
+
#
|
230
|
+
|
231
|
+
#Scriptsock cgisock
|
232
|
+
|
233
|
+
</IfModule>
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<Directory "/usr/local/var/www/cgi-bin">
|
238
|
+
|
239
|
+
AllowOverride None
|
240
|
+
|
241
|
+
Options None
|
242
|
+
|
243
|
+
Require all granted
|
244
|
+
|
245
|
+
</Directory>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
<IfModule headers_module>
|
250
|
+
|
251
|
+
RequestHeader unset Proxy early
|
252
|
+
|
253
|
+
</IfModule>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<IfModule mime_module>
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
TypesConfig /usr/local/etc/httpd/mime.types
|
262
|
+
|
263
|
+
|
264
|
+
|
265
|
+
AddType application/x-compress .Z
|
266
|
+
|
267
|
+
AddType application/x-gzip .gz .tgz
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
</IfModule>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
<IfModule proxy_html_module>
|
276
|
+
|
277
|
+
Include /usr/local/etc/httpd/extra/proxy-html.conf
|
278
|
+
|
279
|
+
</IfModule>
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
<IfModule ssl_module>
|
286
|
+
|
287
|
+
SSLRandomSeed startup builtin
|
288
|
+
|
289
|
+
SSLRandomSeed connect builtin
|
290
|
+
|
291
|
+
</IfModule>
|
292
|
+
|
293
|
+
|
294
|
+
|
109
295
|
Alias /phpmyadmin /usr/local/share/phpmyadmin
|
110
296
|
|
111
297
|
<Directory /usr/local/share/phpmyadmin/>
|
@@ -130,4 +316,6 @@
|
|
130
316
|
|
131
317
|
</Directory>
|
132
318
|
|
319
|
+
|
320
|
+
|
133
|
-
```
|
321
|
+
```
|
1
補足内容追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -49,3 +49,85 @@
|
|
49
49
|
|
50
50
|
|
51
51
|
macを使用しています。
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
httpd.confのコメント行を除外したもの
|
56
|
+
|
57
|
+
```ServerRoot "/usr/local/opt/httpd"
|
58
|
+
|
59
|
+
Listen 8080
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
LoadModule mpm_prefork_module lib/httpd/modules/mod_mpm_prefork.so
|
64
|
+
|
65
|
+
LoadModule authn_file_module lib/httpd/modules/mod_authn_file.so
|
66
|
+
|
67
|
+
LoadModule authn_core_module lib/httpd/modules/mod_authn_core.so
|
68
|
+
|
69
|
+
LoadModule authz_host_module lib/httpd/modules/mod_authz_host.so
|
70
|
+
|
71
|
+
LoadModule authz_groupfile_module lib/httpd/modules/mod_authz_groupfile.so
|
72
|
+
|
73
|
+
LoadModule authz_user_module lib/httpd/modules/mod_authz_user.so
|
74
|
+
|
75
|
+
LoadModule access_compat_module lib/httpd/modules/mod_access_compat.so
|
76
|
+
|
77
|
+
LoadModule auth_basic_module lib/httpd/modules/mod_auth_basic.so
|
78
|
+
|
79
|
+
LoadModule reqtimeout_module lib/httpd/modules/mod_reqtimeout.so
|
80
|
+
|
81
|
+
LoadModule filter_module lib/httpd/modules/mod_filter.so
|
82
|
+
|
83
|
+
LoadModule mime_module lib/httpd/modules/mod_mime.so
|
84
|
+
|
85
|
+
LoadModule log_config_module lib/httpd/modules/mod_log_config.so
|
86
|
+
|
87
|
+
LoadModule env_module lib/httpd/modules/mod_env.so
|
88
|
+
|
89
|
+
LoadModule headers_module lib/httpd/modules/mod_headers.so
|
90
|
+
|
91
|
+
LoadModule setenvif_module lib/httpd/modules/mod_setenvif.so
|
92
|
+
|
93
|
+
LoadModule version_module lib/httpd/modules/mod_version.so
|
94
|
+
|
95
|
+
LoadModule unixd_module lib/httpd/modules/mod_unixd.so
|
96
|
+
|
97
|
+
LoadModule status_module lib/httpd/modules/mod_status.so
|
98
|
+
|
99
|
+
LoadModule autoindex_module lib/httpd/modules/mod_autoindex.so
|
100
|
+
|
101
|
+
LoadModule php7_module /usr/libexec/apache2/libphp7.so
|
102
|
+
|
103
|
+
LoadModule dir_module lib/httpd/modules/mod_dir.so
|
104
|
+
|
105
|
+
LoadModule alias_module lib/httpd/modules/mod_alias.so
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
Alias /phpmyadmin /usr/local/share/phpmyadmin
|
110
|
+
|
111
|
+
<Directory /usr/local/share/phpmyadmin/>
|
112
|
+
|
113
|
+
Options Indexes FollowSymLinks MultiViews
|
114
|
+
|
115
|
+
AllowOverride All
|
116
|
+
|
117
|
+
<IfModule mod_authz_core.c>
|
118
|
+
|
119
|
+
Require all granted
|
120
|
+
|
121
|
+
</IfModule>
|
122
|
+
|
123
|
+
<IfModule !mod_authz_core.c>
|
124
|
+
|
125
|
+
Order allow,deny
|
126
|
+
|
127
|
+
Allow from all
|
128
|
+
|
129
|
+
</IfModule>
|
130
|
+
|
131
|
+
</Directory>
|
132
|
+
|
133
|
+
```
|