Welcome to Takajun's Room

パソコン、オーディオ、カメラ、ビデオ、車、食べ歩きを中心とした blog です。

CentOS 6.0 による 18TB RAID 6 Fileserver の製作(24) httpd.conf 設定

それでは Websrver の httpd.conf もちゃちゃと設定してしまいましょう。使用する domein が複数ありますので VirtualHost を採用しています。

いつものごとく SELinux(Security-Enhanced Linux)の選定が別途必要となりますので注意してください。

### Section 1: Global Environment

ServerTokens Prod

ServerRoot "/etc/httpd"

PidFile run/httpd.pid

Timeout 120

KeepAlive Off

MaxKeepAliveRequests 100

KeepAliveTimeout 15


<IfModule prefork.c>

StartServers 8

MinSpareServers 5

MaxSpareServers 20

ServerLimit 256

MaxClients 256

MaxRequestsPerChild 4000



<IfModule worker.c>

StartServers 4

MaxClients 300

MinSpareThreads 25

MaxSpareThreads 75

ThreadsPerChild 25

MaxRequestsPerChild 0



Listen *:80

NameVirtualHost *:80

# Dynamic Shared Object (DSO) Support

# 表示省略。Digest 認証を採用しますのでコメントアウトしないこと。


User apache

Group apache

### Section 2: 'Main' server configuration

ServerAdmin webmaster@takajun.net

ServerName www.takajun.net:80

UseCanonicalName Off

DocumentRoot "/mnt/data/hogehoge/www"


<Directory />

Options FollowSymLinks

AllowOverride All



# This should be changed to whatever you set DocumentRoot to.

<Directory "/mnt/data/Data2/www/jun">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all



<IfModule mod_userdir.c>

UserDir disabled

#UserDir public_html



DirectoryIndex index.html index.htm

AccessFileName .htaccess


<Files ~ "^\.ht">

Order allow,deny

Deny from all

Satisfy All



TypesConfig /etc/mime.types

DefaultType text/plain


<IfModule mod_mime_magic.c>

MIMEMagicFile /etc/httpd/conf/magic



HostnameLookups Off

# LogLevel: Control the number of messages logged to the error_log.

LogLevel warn

LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

LogFormat "%h %l %u %t \"%r\" %>s %b" common

LogFormat "%{Referer}i -> %U" referer

LogFormat "%{User-agent}i" agent


CustomLog /mnt/data/hogehoge/logs/access_log combined

ServerSignature On

Alias /icons/ "/var/www/icons/"

IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8


AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip

AddIcon 以下表示省略


DefaultIcon /icons/unknown.gif

ReadmeName README.html

HeaderName HEADER.html


IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t

ForceLanguagePriority Prefer Fallback

AddType application/x-compress .Z

AddType application/x-gzip .gz .tgz

AddType application/x-x509-ca-cert .crt

AddType application/x-pkcs7-crl .crl

AddHandler type-map var

AddType text/html .shtml

AddOutputFilter INCLUDES .shtml

Alias /error/ "/var/www/error/"

<IfModule mod_negotiation.c>

<IfModule mod_include.c>

<Directory "/var/www/error">

AllowOverride None

Options IncludesNoExec

AddOutputFilter Includes html

AddHandler type-map var

Order allow,deny

Allow from all

LanguagePriority en es de fr

ForceLanguagePriority Prefer Fallback





BrowserMatch "Mozilla/2" nokeepalive

BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0

BrowserMatch "RealPlayer 4\.0" force-response-1.0

BrowserMatch "Java/1\.0" force-response-1.0

BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully

BrowserMatch "MS FrontPage" redirect-carefully

BrowserMatch "^WebDrive" redirect-carefully

BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully

BrowserMatch "^gnome-vfs/1.0" redirect-carefully

BrowserMatch "^XML Spy" redirect-carefully

BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

<VirtualHost *:80>

ServerAdmin webmaster@dummy-host.example.com

DocumentRoot /www/docs/dummy-host.example.com

ServerName dummy-host.example.com

ErrorLog logs/dummy-host.example.com-error_log

CustomLog logs/dummy-host.example.com-access_log common


<Directory "/mnt/data/hogehoge/www/">

Options Indexes FollowSymLinks

AllowOverride None

Order allow,deny

Allow from all

AuthType Digest

AuthName "hogehoge"

AuthUserFile /etc/httpd/conf/.htdigest

Require user hogehoge1 hogehoge2


CentOS 6.0 による 18TB RAID 6 Fileserver の製作

(1) 3ware 9690SA-8I による RAID 6 18TB fileserver

(2) CBL-SFF8087OCF-05M

(3)CentOS 6.0

(4)3TB HDD 発注

(5)3TB HDD 到着


(7)3ware RAID 6 構築中

(8)OS インストール その1

(9)OS インストール その2

(10)CentOS 6.0 3ware 3DM2 インストール

(11)CentOS 6.0 gfs2 のインストール


(12b)memory 増設

(13) HDDリムーバブルラック

(14) OS クラッシュ

(15)samba install

(16)samba 転送速度トラブル

(17)samba user 設定

(18)smb.conf 設定

(19)samba 起動

(20)SELinux 設定確認

(21)samba.conf 設定変更

(22)foobar2000 設定

(23)httpd 設定

(24)httpd.conf 設定