Last active
August 29, 2015 13:57
-
-
Save kowata/9777633 to your computer and use it in GitHub Desktop.
Mac OS 10.8 でWeb共有を有効にして、PHPも使えるようにする
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
【1】まず ~/Sites フォルダを作成 | |
mkdir -p ~/Sites | |
【2】動作確認用に~/Sites/index.htmlも追加 | |
echo Now Web Sharing! ]] > ~/Sites/index.html | |
【3】apacheの設定ファイルを追加 | |
$ sudo vi /etc/apache2/users/hogehoge.conf | |
を実行してパスワードを入力したに Vim モードへ | |
*エディターは nano の方が使いやすいかも(?) | |
【4】[a] or [i] キーを入力して「インサートモード」にして下記をペースト | |
<Directory "/Users/kowata/Sites/"> | |
Options Indexes MultiViews | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
【5】[esc]でコマンドモードへ | |
「:wq」を入力して保存して終了。 | |
「:wq!」と入力すれば読み取り専用ファイルでも強制保存 | |
【6】アパッチを起動 | |
$ sudo apachectl start | |
【7】設定ファイルを開く(要:パスワード) | |
$ sudo vi /etc/apache2/httpd.conf | |
【8】↓の行頭の # を削除してコメントアウトを外す | |
#LoadModule php5_module libexec/apache2/libphp5.so | |
*vi での Delete は “x” | |
【9】[esc]でコマンドモードへ | |
「:wq」を入力して保存して終了。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment