回答編集履歴
1
追記
test
CHANGED
@@ -17,3 +17,281 @@
|
|
17
17
|
sudo port search intl
|
18
18
|
|
19
19
|
```
|
20
|
+
|
21
|
+
---
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
以下のコマンドで起動したのであれば、
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
```bash
|
30
|
+
|
31
|
+
# apachectl restart
|
32
|
+
|
33
|
+
```
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
以下のコマンドで、ヘルプが表示される。
|
38
|
+
|
39
|
+
apachectl に限らず、たいていのコマンドには、ヘルプを表示するオプションが必ず存在しています。正直ググるより早い。
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
```bash
|
44
|
+
|
45
|
+
apachectl -?
|
46
|
+
|
47
|
+
```
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
コマンドによっては -? だったり --help だったりと統一性がないのが、難だが、
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
```bash
|
56
|
+
|
57
|
+
man apachectl
|
58
|
+
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
のように、man のあとに、コマンド名をつければ表示される。
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
```bash
|
68
|
+
|
69
|
+
apachectl -?
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
Usage: /usr/sbin/httpd [-D name] [-d directory] [-f file]
|
74
|
+
|
75
|
+
[-C "directive"] [-c "directive"]
|
76
|
+
|
77
|
+
[-k start|restart|graceful|graceful-stop|stop]
|
78
|
+
|
79
|
+
[-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
|
80
|
+
|
81
|
+
Options:
|
82
|
+
|
83
|
+
-D name : define a name for use in <IfDefine name> directives
|
84
|
+
|
85
|
+
-d directory : specify an alternate initial ServerRoot
|
86
|
+
|
87
|
+
-f file : specify an alternate ServerConfigFile
|
88
|
+
|
89
|
+
-C "directive" : process directive before reading config files
|
90
|
+
|
91
|
+
-c "directive" : process directive after reading config files
|
92
|
+
|
93
|
+
-e level : show startup errors of level (see LogLevel)
|
94
|
+
|
95
|
+
-E file : log startup errors to file
|
96
|
+
|
97
|
+
-v : show version number
|
98
|
+
|
99
|
+
-V : show compile settings
|
100
|
+
|
101
|
+
-h : list available command line options (this page)
|
102
|
+
|
103
|
+
-l : list compiled in modules
|
104
|
+
|
105
|
+
-L : list available configuration directives
|
106
|
+
|
107
|
+
-t -D DUMP_VHOSTS : show parsed vhost settings
|
108
|
+
|
109
|
+
-t -D DUMP_RUN_CFG : show parsed run settings
|
110
|
+
|
111
|
+
-S : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
|
112
|
+
|
113
|
+
-t -D DUMP_MODULES : show all loaded modules
|
114
|
+
|
115
|
+
-M : a synonym for -t -D DUMP_MODULES
|
116
|
+
|
117
|
+
-t -D DUMP_INCLUDES: show all included configuration files
|
118
|
+
|
119
|
+
-t : run syntax check for config files
|
120
|
+
|
121
|
+
-T : start without DocumentRoot(s) check
|
122
|
+
|
123
|
+
-X : debug mode (only one worker, do not detach)
|
124
|
+
|
125
|
+
```
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
```bash
|
130
|
+
|
131
|
+
-t -D DUMP_INCLUDES: show all included configuration files
|
132
|
+
|
133
|
+
```
|
134
|
+
|
135
|
+
に書いてあるように、「設定ファイルを全て表示する」というものが存在しているのだから、これを実行する。
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
```bash
|
140
|
+
|
141
|
+
apachectl -t -D DUMP_INCLUDES
|
142
|
+
|
143
|
+
```
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
↓(結果:これは私の環境での結果)
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
```bash
|
152
|
+
|
153
|
+
apachectl -t -D DUMP_INCLUDES
|
154
|
+
|
155
|
+
Included configuration files:
|
156
|
+
|
157
|
+
(*) /private/etc/apache2/httpd.conf
|
158
|
+
|
159
|
+
(491) /private/etc/apache2/extra/httpd-mpm.conf
|
160
|
+
|
161
|
+
(497) /private/etc/apache2/extra/httpd-autoindex.conf
|
162
|
+
|
163
|
+
(537) /private/etc/apache2/other/php5.conf
|
164
|
+
|
165
|
+
```
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
php5 があるので、こちらはこちらはコメントアウトして php7 にしたい。
|
170
|
+
|
171
|
+
php7の設定ファイルが存在するかどうか確認。
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
```bash
|
176
|
+
|
177
|
+
ls -al /private/etc/apache2/other/
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
total 0
|
182
|
+
|
183
|
+
drwxr-xr-x 3 root wheel 102 8 9 08:35 .
|
184
|
+
|
185
|
+
drwxr-xr-x 11 root wheel 374 9 21 22:34 ..
|
186
|
+
|
187
|
+
-r--r--r-- 1 root wheel 194 8 9 08:35 php5.conf
|
188
|
+
|
189
|
+
```
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
存在していない。
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
```bash
|
198
|
+
|
199
|
+
php -v
|
200
|
+
|
201
|
+
|
202
|
+
|
203
|
+
PHP 7.1.0 (cli) (built: Dec 2 2016 11:32:42) ( NTS )
|
204
|
+
|
205
|
+
Copyright (c) 1997-2016 The PHP Group
|
206
|
+
|
207
|
+
Zend Engine v3.1.0-dev, Copyright (c) 1998-2016 Zend Technologies
|
208
|
+
|
209
|
+
with Zend OPcache v7.1.0, Copyright (c) 1999-2016, by Zend Technologies
|
210
|
+
|
211
|
+
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans
|
212
|
+
|
213
|
+
```
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
コマンドラインでは php7 が存在している。
|
218
|
+
|
219
|
+
http と php をつなぐ何かがあるはず…
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
```bash
|
224
|
+
|
225
|
+
brew search http
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
darkhttpd httperf
|
230
|
+
|
231
|
+
homebrew/apache/httpd22 httpie
|
232
|
+
|
233
|
+
homebrew/apache/httpd24 ✔ httping
|
234
|
+
|
235
|
+
homebrew/php/php53-http httpry
|
236
|
+
|
237
|
+
homebrew/php/php54-http httpstat
|
238
|
+
|
239
|
+
homebrew/php/php54-httpparser httptunnel
|
240
|
+
|
241
|
+
homebrew/php/php55-http libhttpserver
|
242
|
+
|
243
|
+
homebrew/php/php55-httpparser libmicrohttpd
|
244
|
+
|
245
|
+
homebrew/php/php56-http lighttpd
|
246
|
+
|
247
|
+
homebrew/php/php56-httpparser mighttpd2
|
248
|
+
|
249
|
+
http-parser nghttp2
|
250
|
+
|
251
|
+
http_load slowhttptest
|
252
|
+
|
253
|
+
httpdiff weighttp
|
254
|
+
|
255
|
+
homebrew/emacs/know-your-http-well
|
256
|
+
|
257
|
+
homebrew/emacs/simple-httpd
|
258
|
+
|
259
|
+
homebrew/nginx/http-accounting-nginx-module
|
260
|
+
|
261
|
+
homebrew/nginx/http-flood-detector-nginx-module
|
262
|
+
|
263
|
+
homebrew/nginx/http-remote-passwd-nginx-module
|
264
|
+
|
265
|
+
Caskroom/cask/httpscoop
|
266
|
+
|
267
|
+
```
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
`homebrew/php/php56-http` があるのに、php7 がない!
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
そして初めてググる
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
[brew httpd php7](https://www.google.co.jp/search?q=brew+http+php7&ie=utf-8&oe=utf-8&client=firefox-b&gfe_rd=cr&ei=68JQWO73J7OL8Qfn36fgCw#safe=off&q=brew+httpd+php7)
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
[homebrewでapache2.4とphp7.0.7をインストール](http://qiita.com/OTAGRAMER/items/5d5ee63e05ae3c759365)
|
284
|
+
|
285
|
+
|
286
|
+
|
287
|
+
> ちなみにphpインストールコマンドに--homebrew-apxsを付与すると、、
|
288
|
+
|
289
|
+
>
|
290
|
+
|
291
|
+
> LoadModule php7_module /usr/local/opt/php70/libexec/apache2/libphp7.so
|
292
|
+
|
293
|
+
>
|
294
|
+
|
295
|
+
> この一文がhttpd.conf(apache設定ファイル)に自動的に追記され、apache側がこのphpを(もしpcの中に色んなphpが混在していても)判別し、ブラウザで実行することができるようになる。これがないとこのphpはブラウザで(というかapacheで)認識できない。
|
296
|
+
|
297
|
+
|