Created
February 9, 2013 05:24
-
-
Save nobonobo/4743989 to your computer and use it in GitHub Desktop.
OSXのapacheでローカルテストするときの設定メモ。
(PidFileやLockFileの設定がキモなんだけどそこでコケたら標準出力に何も出さずに落ちるっていうのはどうなの?)
$ httpd -k start -f $PWD/httpd.conf
This file contains hidden or 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
| ServerRoot "/usr" | |
| LoadModule dir_module libexec/apache2/mod_dir.so | |
| LoadModule authz_host_module libexec/apache2/mod_authz_host.so | |
| LoadModule autoindex_module libexec/apache2/mod_autoindex.so | |
| LoadModule alias_module libexec/apache2/mod_alias.so | |
| LoadModule rewrite_module libexec/apache2/mod_rewrite.so | |
| LoadModule log_config_module libexec/apache2/mod_log_config.so | |
| LoadModule mime_module libexec/apache2/mod_mime.so | |
| LoadModule setenvif_module libexec/apache2/mod_setenvif.so | |
| PidFile "${TMPDIR}/httpd.pid" | |
| LockFile "${TMPDIR}/accept.lock" | |
| LogFormat "%h %l %u %t \"%r\" %>s %b" common | |
| CustomLog "${TMPDIR}/access.log" common | |
| ErrorLog "${TMPDIR}/error.log" | |
| Listen 8888 | |
| ServerName localhost | |
| ServerSignature On | |
| ServerTokens Full | |
| UseCanonicalName Off | |
| HostnameLookups Off | |
| Timeout 30 | |
| KeepAlive On | |
| MaxKeepAliveRequests 10 | |
| KeepAliveTimeout 15 | |
| AddDefaultCharset UTF-8 | |
| DefaultType text/plain | |
| IndexIgnore .htaccess | |
| <FilesMatch "^.ht"> | |
| Order allow,deny | |
| Deny from all | |
| </FilesMatch> | |
| <IfModule mime_module> | |
| TypesConfig /private/etc/apache2/mime.types | |
| #AddType application/x-compress .Z | |
| #AddType application/x-gzip .gz .tgz | |
| </IfModule> | |
| DocumentRoot "${PWD}/blog/html" | |
| DirectoryIndex index.html | |
| AccessFileName .htaccess | |
| <Directory "${PWD}/blog/html"> | |
| Options Indexes FollowSymLinks | |
| AllowOverride All | |
| Order allow,deny | |
| Allow from all | |
| </Directory> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment