#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80
Listen 443
13:29:59 [Apache] Error: Apache shutdown unexpectedly.
13:29:59 [Apache] This may be due to a blocked port, missing dependencies,
13:29:59 [Apache] improper privileges, a crash, or a shutdown by another method.
13:29:59 [Apache] Press the Logs button to view error logs and check
13:29:59 [Apache] the Windows Event Viewer for more clues
13:29:59 [Apache] If you need more help, copy and post this
13:29:59 [Apache] entire log window on the forums
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.php index.pl index.cgi index.asp index.shtml index.html index.htm \
default.php default.pl default.cgi default.asp default.shtml default.html default.htm \
home.php home.pl home.cgi home.asp home.shtml home.html home.htm
</IfModule>
デフォルトのままでも大丈夫ですが、ゴチャゴチャしているので最小限に整理。
変更後
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
PHP / php.ini:default_charsetをUTF-8に変更
文字コードをUTF-8に変更。※デフォルトでUTF-8になっているかも?
; PHP's default character set is set to UTF-8.
; http://php.net/default-charset
default_charset="UTF-8"
PHP / php.ini:date.timezoneを日本の時間帯に変更
PHPにで使用する日付や時刻の標準時間を日本時間に変更。
変更前
[Date]
date.timezone=Europe/Berlin
変更後
[Date]
date.timezone=Asia/Tokyo
KiRi
結構下の方に設定があります。
PHP / php.ini:mbstring.languageを日本語に変更
コメントアウトされているので解除する。
変更前
[mbstring]
; language for internal character representation.
; This affects mb_send_mail() and mbstring.detect_order.
; http://php.net/mbstring.language
;mbstring.language = Japanese
変更後
[mbstring]
; language for internal character representation.
; This affects mb_send_mail() and mbstring.detect_order.
; http://php.net/mbstring.language
mbstring.language = Japanese
PHP / php.ini:mbstring.detect_orderをUTF-8へ
変更前
; automatic encoding detection order.
; "auto" detect order is changed according to mbstring.language
; http://php.net/mbstring.detect-order
;mbstring.detect_order = auto
変更後
; automatic encoding detection order.
; "auto" detect order is changed according to mbstring.language
; http://php.net/mbstring.detect-order
mbstring.detect_order = UTF-8
PHP / php.ini:mbstring.substitute_characterを有効にする
無効な文字を代替えの文字で出力しないように変更
変更前
; substitute_character used when character cannot be converted
; one from another
; http://php.net/mbstring.substitute-character
;mbstring.substitute_character = none
変更後
; substitute_character used when character cannot be converted
; one from another
; http://php.net/mbstring.substitute-character
mbstring.substitute_character = none
PHP / php.ini:expose_phpをOFFにしてバージョンを隠す
セキュリティ対策のため、HTTP応答ヘッダーからPHPのバージョンを削除(見えなく)します。
変更前
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; http://php.net/expose-php
expose_php=On
変更後
; Decides whether PHP may expose the fact that it is installed on the server
; (e.g. by adding its signature to the Web server header). It is no security
; threat in any way, but it makes it possible to determine whether you use PHP
; on your server or not.
; http://php.net/expose-php
expose_php=Off
PHP / php.ini:session.sid_lengthの値を32以上にする
セッションのIDの文字列を長くして、セキュリティを改善する。※推奨は32以上。
変更前
; Set session ID character length. This value could be between 22 to 256.
; Shorter length than default is supported only for compatibility reason.
; Users should use 32 or more chars.
; http://php.net/session.sid-length
; Default Value: 32
; Development Value: 26
; Production Value: 26
session.sid_length=26
変更後
; Set session ID character length. This value could be between 22 to 256.
; Shorter length than default is supported only for compatibility reason.
; Users should use 32 or more chars.
; http://php.net/session.sid-length
; Default Value: 32
; Development Value: 26
; Production Value: 26
session.sid_length=32
; Define how many bits are stored in each character when converting
; the binary hash data to something readable.
; Possible values:
; 4 (4 bits: 0-9, a-f)
; 5 (5 bits: 0-9, a-v)
; 6 (6 bits: 0-9, a-z, A-Z, "-", ",")
; Default Value: 4
; Development Value: 5
; Production Value: 5
; http://php.net/session.hash-bits-per-character
session.sid_bits_per_character=5
コメント