apache

  1. インストール
    $ sudo yum -y install httpd
  2. /etc/httpd/conf/httpd.conf を編集して 404 Not Found のときに、サーバー名が表示されないようにする
     diff -u httpd.conf.original httpd.conf
    --- httpd.conf.original	2014-03-02 20:51:54.378513926 +0900
    +++ httpd.conf	2014-03-02 20:51:39.787508846 +0900
    @@ -41,7 +41,7 @@
     # Don't give away too much information about all the subcomponents
     # we are running.  Comment out this line if you don't mind remote sites
     # finding out what major optional modules you are running
    -ServerTokens OS
    +ServerTokens ProductOnly
    
     #
     # ServerRoot: The top of the directory tree under which the server's
    @@ -533,7 +533,7 @@
     # Set to "EMail" to also include a mailto: link to the ServerAdmin.
     # Set to one of:  On | Off | EMail
     #
    -ServerSignature On
    +ServerSignature Off
    
     #
     # Aliases: Add here as many aliases as you need (with no limit). The format is
  3. 再起動
    $ sudo /sbin/service httpd restart

php

  1. インストール
    $ sudo yum -y install php php-devel php-mbstring php-gd
  2. /etc/php.ini
    $ diff -u /etc/php.ini /etc/php.ini.original
    --- /etc/php.ini	2014-03-02 22:17:11.844828929 +0900
    +++ /etc/php.ini.original	2014-03-02 21:25:56.370610281 +0900
    @@ -429,7 +429,7 @@
     ; threat in any way, but it makes it possible to determine whether you use PHP
     ; on your server or not.
     ; http://www.php.net/manual/en/ini.core.php#ini.expose-php
    -expose_php = Off
    +expose_php = On
    
     ;;;;;;;;;;;;;;;;;;;
     ; Resource Limits ;
    @@ -631,7 +631,7 @@
     ; empty.
     ; http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-log
     ; Example:
    -error_log = /var/log/php_errors.log
    +;error_log = php_errors.log
     ; Log errors to syslog (Event Log on NT, not valid in Windows 95).
     ;error_log = syslog
    
    @@ -726,7 +726,7 @@
    
     ; Maximum size of POST data that PHP will accept.
     ; http://www.php.net/manual/en/ini.core.php#ini.post-max-size
    -post_max_size = 100M
    +post_max_size = 8M
    
     ; Magic quotes are a preprocessing feature of PHP where PHP will attempt to
     ; escape any character sequences in GET, POST, COOKIE and ENV data which might
    @@ -783,7 +783,6 @@
    
     ; UNIX: "/path1:/path2"
     ;include_path = ".:/php/includes"
    -include_path = ".:/usr/share/php"
     ;
     ; Windows: "\path1;\path2"
     ;include_path = ".;c:\php\includes"
    @@ -876,7 +875,7 @@
    
     ; Maximum allowed size for uploaded files.
     ; http://www.php.net/manual/en/ini.core.php#ini.upload-max-filesize
    -upload_max_filesize = 30M
    +upload_max_filesize = 2M
    
     ;;;;;;;;;;;;;;;;;;
     ; Fopen wrappers ;
    @@ -944,7 +943,7 @@
     [Date]
     ; Defines the default timezone used by the date functions
     ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.timezone
    -date.timezone = Asia/Tokyo
    +;date.timezone =
    
     ; http://www.php.net/manual/en/datetime.configuration.php#ini.date.default-latitude
     ;date.default_latitude = 31.7667
    @@ -1540,17 +1539,17 @@
     [mbstring]
     ; language for internal character representation.
     ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.language
    -mbstring.language = Japanese
    +;mbstring.language = Japanese
    
     ; internal/script encoding.
     ; Some encoding cannot work as internal encoding.
     ; (e.g. SJIS, BIG5, ISO-2022-*)
     ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.internal-encoding
    -mbstring.internal_encoding = EUC-JP
    +;mbstring.internal_encoding = EUC-JP
    
     ; http input encoding.
     ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.http-input
    -mbstring.http_input = auto
    +;mbstring.http_input = auto
    
     ; http output encoding. mb_output_handler must be
     ; registered as output buffer to function
    @@ -1568,7 +1567,7 @@
     ; automatic encoding detection order.
     ; auto means
     ; http://www.php.net/manual/en/mbstring.configuration.php#ini.mbstring.detect-order
    -mbstring.detect_order = auto
    +;mbstring.detect_order = auto 
    
     ; substitute_character used when character cannot be converted
     ; one from another
  3. 再起動
    $ sudo /sbin/service httpd restart

CentOS 6 on さくらVPS


トップ   編集 凍結 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS   sitemap
Last-modified: 2014-03-02 (日) 22:27:39 (3877d)
Short-URL:
ISBN10
ISBN13
9784061426061