1
|
●バックアップ取得
|
2
|
[root@web2 ~]# cp -p /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org
|
3
|
|
4
|
●httpd.conf編集
|
5
|
|
6
|
以下の内容に変更
|
7
|
|
8
|
[root@web2 /www]# diff -c /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.org
|
9
|
*** /etc/httpd/conf/httpd.conf Thu Nov 24 15:37:27 2011
|
10
|
--- /etc/httpd/conf/httpd.conf.org Fri Oct 21 06:05:19 2011
|
11
|
***************
|
12
|
*** 71,77 ****
|
13
|
# KeepAlive: Whether or not to allow persistent connections (more than
|
14
|
# one request per connection). Set to "Off" to deactivate.
|
15
|
#
|
16
|
! KeepAlive On
|
17
|
|
18
|
#
|
19
|
# MaxKeepAliveRequests: The maximum number of requests to allow
|
20
|
--- 71,77 ----
|
21
|
# KeepAlive: Whether or not to allow persistent connections (more than
|
22
|
# one request per connection). Set to "Off" to deactivate.
|
23
|
#
|
24
|
! KeepAlive Off
|
25
|
|
26
|
#
|
27
|
# MaxKeepAliveRequests: The maximum number of requests to allow
|
28
|
***************
|
29
|
*** 131,138 ****
|
30
|
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
|
31
|
#
|
32
|
#Listen 12.34.56.78:80
|
33
|
! #Listen 80
|
34
|
! Listen 182.48.31.136:80
|
35
|
|
36
|
#
|
37
|
# Dynamic Shared Object (DSO) Support
|
38
|
--- 131,137 ----
|
39
|
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
|
40
|
#
|
41
|
#Listen 12.34.56.78:80
|
42
|
! Listen 80
|
43
|
|
44
|
#
|
45
|
# Dynamic Shared Object (DSO) Support
|
46
|
***************
|
47
|
*** 970,976 ****
|
48
|
#
|
49
|
# Use name-based virtual hosting.
|
50
|
#
|
51
|
! NameVirtualHost *:80
|
52
|
#
|
53
|
# NOTE: NameVirtualHost cannot be used without a port specifier
|
54
|
# (e.g. :80) if mod_ssl is being used, due to the nature of the
|
55
|
--- 969,975 ----
|
56
|
#
|
57
|
# Use name-based virtual hosting.
|
58
|
#
|
59
|
! #NameVirtualHost *:80
|
60
|
#
|
61
|
# NOTE: NameVirtualHost cannot be used without a port specifier
|
62
|
# (e.g. :80) if mod_ssl is being used, due to the nature of the
|
63
|
***************
|
64
|
*** 990,1005 ****
|
65
|
# ErrorLog logs/dummy-host.example.com-error_log
|
66
|
# CustomLog logs/dummy-host.example.com-access_log common
|
67
|
#</VirtualHost>
|
68
|
- <VirtualHost *:80>
|
69
|
- ServerName 182.48.31.136
|
70
|
- ServerAlias web2.i-generation.jp
|
71
|
- DocumentRoot /www/aff/user/www
|
72
|
- ErrorLog logs/error_log_aff
|
73
|
- CustomLog logs/access_log_aff combined
|
74
|
- RewriteEngine on
|
75
|
- # RewriteRule ^/([^/]+)/?$ /cl/click.php?b_id=$1
|
76
|
- <Directory "/www/aff/user/www">
|
77
|
- Options FollowSymLinks MultiViews
|
78
|
- AllowOverride All
|
79
|
- </Directory>
|
80
|
- </VirtualHost>
|
81
|
--- 989,991 ----
|
82
|
|
83
|
●Apache再起動
|
84
|
[root@web2 ~]# /etc/init.d/httpd restart
|
85
|
Stopping httpd: [ OK ]
|
86
|
Starting httpd: [ OK ]
|
87
|
|
88
|
●Apache自動起動設定
|
89
|
[root@web2 ~]# chkconfig --list httpd
|
90
|
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
|
91
|
[root@web2 ~]# chkconfig httpd on
|
92
|
[root@web2 ~]# chkconfig --list httpd
|
93
|
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
|