インストールと自動起動設定
# yum install httpd # service httpd start # chkconfig httpd on
httpd.conf の設定
情報を出さないようにする
# 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
スポンサードリンク
サーバー名の設定
# If your host doesn't have a registered DNS name, enter its IP address here. # You will have to access it by its address anyway, and this will make # redirections work in a sensible way. # ServerName www.example.com:80
↓
ServerName localhost.localdomain
AddDefaultCharset を Off にする
# Specify a default charset for all content served; this enables # interpretation of all content as UTF-8 by default. To use the # default browser choice (ISO-8859-1), or to allow the META tags # in HTML content to override this choice, comment out this # directive: # AddDefaultCharset UTF-8
↓
AddDefaultCharset Off
バーチャルホストの設定
#<VirtualHost *:80> # ServerAdmin [email protected] # 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 #</VirtualHost> NameVirtualHost 192.168.1.24:80 <VirtualHost 192.168.1.24:80> ServerName rt.example.com DocumentRoot /opt/rt3/share/html AddDefaultCharset UTF-8 : : </VirtualHost> NameVirtualHost 192.168.1.24:80 <VirtualHost 192.168.1.24:80> ServerName otrs.example.com : : </VirtualHost>
コメント