Red Hat APPLICATION STACK 2.0 RELEASE Bedienungsanleitung Seite 12

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 22
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 11
A Principled Technologies test report 12
Red Hat Enterprise Linux 6: Performance advantages with an
open source software stack
Installing Apache Web server and PHP on Red Hat Enterprise Linux 6.2
The benchmark used up to three independent DVD stores. They are accessed through one instance of the
Apache Web server configured with three virtual hosts listening on TCP port 80 on three separate IP addresses:
192.168.30.21, 192.168.30.22, and 192.168.30.23.
1. Modify the Apache configuration file, /etc/httpd/conf/httpd.conf. For each row in the next table, replace the
line in the Apache configuration file (the entry in the left column) with the contents on the right.
Original Apache Web Server setting
Updated setting
KeepAlive Off
KeepAlive On
#ServerName www.example.com:80
ServerName 191.168.30.21
AccessFileName .htaccess
#AccessFileName .htaccess
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
#ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
<Directory "/var/www/cgi-bin">
AllowOverride None
Options None
Order allow,deny
Allow from all
</Directory>
#<Directory "/var/www/cgi-bin">
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
#</Directory>
ReadmeName README.html
HeaderName HEADER.html
#ReadmeName README.html
#HeaderName HEADER.html
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
#AddType text/html .shtml
#AddOutputFilter INCLUDES .shtml
2. Insert the following lines at the end of the file /etc/httpd/conf/httpd.conf to create the three virtual Web sites
and to specify how PHP is to connect to the site’s MySQL instance:
NameVirtualHost 192.168.30.21:80
NameVirtualHost 192.168.30.22:80
NameVirtualHost 192.168.30.23:80
# separate DVD Stores
<VirtualHost 192.168.30.21:80>
DocumentRoot /www/html01
php_value mysql.default_socket /mysql/log01/mysql.sock
php_value mysqli.default_socket /mysql/log01/mysql.sock
</VirtualHost>
<VirtualHost 192.168.30.22:80>
DocumentRoot /www/html02
php_value mysql.default_socket /mysql/log02/mysql.sock
php_value mysqli.default_socket /mysql/log02/mysql.sock
</VirtualHost>
<VirtualHost 192.168.30.23:80>
DocumentRoot /www/html03
php_value mysql.default_socket /mysql/log03/mysql.sock
php_value mysqli.default_socket /mysql/log03/mysql.sock
</VirtualHost>
3. Disable unneeded Apache Web Server extensions:
cd /etc/httpd/conf.d
for i in *conf; do
mv ${i} ${i}-orig
Seitenansicht 11
1 2 ... 7 8 9 10 11 12 13 14 15 16 17 ... 21 22

Kommentare zu diesen Handbüchern

Keine Kommentare