質問編集履歴

1

記事を見て設定した内容と各バージョンについて追記しました

2019/02/27 04:15

投稿

Fukada
Fukada

スコア13

test CHANGED
File without changes
test CHANGED
@@ -7,3 +7,151 @@
7
7
  httpd.confの設定とhttpd-vhosts.confの設定をしました。
8
8
 
9
9
  よろしければご教授お願いいたします。
10
+
11
+
12
+
13
+ ---------------------------------------------------
14
+
15
+ 追記
16
+
17
+
18
+
19
+ 記事を見て変更した箇所
20
+
21
+
22
+
23
+ httpd.conf
24
+
25
+ ```
26
+
27
+ #LoadModule include_module libexec/apache2/mod_include.so
28
+
29
+ #LoadModule vhost_alias_module libexec/apache2/mod_vhost_alias.so
30
+
31
+ #LoadModule userdir_module libexec/apache2/mod_userdir.so
32
+
33
+ #LoadModule rewrite_module libexec/apache2/mod_rewrite.so
34
+
35
+ #LoadModule php5_module libexec/apache2/libphp5.so
36
+
37
+ ```のコメントアウトを外す
38
+
39
+ ```
40
+
41
+ AllowOverride none
42
+
43
+ Require all denied
44
+
45
+
46
+
47
+ AllowOverride all
48
+
49
+ Require all granted
50
+
51
+ ```と書き換える
52
+
53
+ ```
54
+
55
+ Options FollowSymLinks Multiviews
56
+
57
+
58
+
59
+ Options FollowSymLinks Multiviews Indexes Includes
60
+
61
+ ```を追記
62
+
63
+ ```
64
+
65
+ #AddType text/html .shtml
66
+
67
+ #AddOutputFilter INCLUDES .shtml
68
+
69
+
70
+
71
+ AddType text/html .shtml
72
+
73
+ AddOutputFilter INCLUDES .shtml .html
74
+
75
+ ```コメントアウトを外し追記
76
+
77
+ ```
78
+
79
+ #Include /private/etc/apache2/extra/httpd-userdir.conf
80
+
81
+ #Include /private/etc/apache2/extra/httpd-vhosts.conf
82
+
83
+
84
+
85
+ Include /private/etc/apache2/extra/httpd-userdir.conf
86
+
87
+ Include /private/etc/apache2/extra/httpd-vhosts.conf
88
+
89
+ ```コメントアウトを外す
90
+
91
+
92
+
93
+ httpd-userdirの設定
94
+
95
+
96
+
97
+ ```
98
+
99
+ <VirtualHost *:80>
100
+
101
+ DocumentRoot "/Users/laz/Sites/index.html"
102
+
103
+ ServerName {yourservername}
104
+
105
+ <Directory "/Users/laz/Sites/index.html">
106
+
107
+ Require all granted
108
+
109
+ DirectoryIndex index.html
110
+
111
+ Options Includes
112
+
113
+ </Directory>
114
+
115
+ </VirtualHost>
116
+
117
+ ```を行末に追記
118
+
119
+
120
+
121
+ ホームにSitesというディレクトリを作成して以下の内容でlaz.confを作成(lazは私のユーザーネームです)
122
+
123
+ ```
124
+
125
+ <Directory "/Users/laz/Sites">
126
+
127
+ AddType text/html .shtml .html
128
+
129
+ AddHandler server-parsed .shtml .html
130
+
131
+ Options Indexes MultiViews FollowSymlinks Includes
132
+
133
+ AllowOverride all
134
+
135
+ Require all granted
136
+
137
+ </Directory>
138
+
139
+ ```
140
+
141
+
142
+
143
+ php,mysqlに関しては```brew install```を使用しました。
144
+
145
+ バージョンは
146
+
147
+ php:7.1.23
148
+
149
+ mysql:8.0.12
150
+
151
+
152
+
153
+ phpMyAdminは[https://www.phpmyadmin.net](https://www.phpmyadmin.net)より最新の4.8.5をダウンロードしました。
154
+
155
+
156
+
157
+ mysqlはターミナルからの接続はできました。