Skip to content

Instantly share code, notes, and snippets.

@japboy
Created March 25, 2012 04:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save japboy/2191330 to your computer and use it in GitHub Desktop.
Save japboy/2191330 to your computer and use it in GitHub Desktop.
CakePHP 動かすための httpd.conf 最小設定的なモノ
##
# Apache 2: オレオレ設定ファイル (PHP 動かす編)
#
# OS X 標準の httpd.conf に以下のような行を追加して読み出す事:
# Include /path/to/this/my_httpd.conf
#
# @author twitter.com/japboy
# @version 2012-03-25
# DocumentRoot
DocumentRoot "/path/to/document_root"
# LoadModule
LoadModule rewrite_module "/usr/libexec/apache2/mod_rewrite.so"
LoadModule php5_module "/usr/libexec/apache2/libphp5.so"
##
# Common settings depended on modules
<IfModule dir_module>
DirectoryIndex index.html index.php index.cgi index.htm
</IfModule>
##
# Common settings depended on directories
<Directory "/path/to/document_root">
Options FollowSymLinks Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
##
# Common settings for FilesMatch
<FilesMatch "\.php$">
SetHandler application/x-httpd-php
</FilesMatch>
<FilesMatch "\.phps$">
SetHandler application/x-httpd-php-source
</FilesMatch>
##
# Settings for all of VirtualHost
<VirtualHost *:80>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment