,,
,,
[root@localhost 地方]#,yum -y install httpd
t
[root@localhost httpd] #, vim conf/httpd . conf # DocumentRoot "/var/www/html”
[root@localhost httpd] #, cd /etc/httpd/conf.d/[root@localhost conf.d] #, vim vhost.conf & lt; VirtualHost *: 80比; ,,ServerName www.a.com ,,DocumentRoot “/www/博客” ,,& lt; Directory “/www/博客”比; ,,,,,Options 没有 ,,,,,Allowoverride 没有 ,,,,,Require all 理所当然 ,,& lt; Directory> ,,ProxyRequests ,,ProxyPassMatch ^/(. * \ . php),美元fcgi://172.18.250.78:9000/www/博客/1美元 & lt;/VirtualHost> & lt; VirtualHost *: 80比; ,,ServerName www.b.net ,,DocumentRoot “/www/php” ,,& lt; Directory “/www/php”比; ,,,,,Options 没有 ,,,,,Allowoverride 没有 ,,,,,Require all 理所当然 ,,& lt; Directory> ,,ProxyRequests ,,ProxyPassMatch ^/(. * \ . php),美元fcgi://172.18.250.78:9000/www/php/1美元 & lt;/VirtualHost>
,
[root@localhost conf.d] #, mkdir -p /www/博客 [root@localhost conf.d] #, mkdir -p /www/php
[root@localhost conf.d] #, systemctl start httpd.service [root@localhost conf.d] #, ss 棕褐色 LISTEN ,,,,, 0,,,,,, 128,,,,,,,::: 80,,,,,,,,::: *
[root@localhost conf.d] #, echo “www.a.com”,在/www/博客/index . html [root@localhost conf.d] #, echo “www.b.net”,在/www/php/index . html
,
好的,虚拟主机正常
二,百胜安装php
[root@localhost ~] #, yum -y install php-fpm
PHPFastCGI
[root@localhost ~] #, vim /etc/php-fpm.d/www.conf 时间=listen 172.18.250.78:9000 ,,,,,,,,,,,,,,,//本机IP listen.allowed_clients =, 172.18.250.77 ,,,,//httpd端IP
[root@localhost ~] #, systemctl start php-fpm.service (root@localhost ~) #, ss 棕褐色 LISTEN ,,,,, 0,,,,,, 128,,,,,,,,,,,,,, 172.18.250.78:9000 ,,,,,,, *: *
,
[root@localhost ~] #, mkdir -p /www/博客 [root@localhost ~) #, mkdir -p /www/php
,
[root@localhost ~] #, mkdir -p /www/博客 (root@localhost ~) #, mkdir -p /www/php (root@localhost ~) #, vim /www/博客/index . php (root@localhost ~) #, vim /www/php/index . php php & lt; ? ,,phpinfo (); ,?在
,
[root@localhost ~] #, yum -y install mysql服务器
,
[root@localhost ~] #, service mysqld 开始 (root@localhost ~) # mysql_secure_installation Enter current  password for  root (Enter for 没有):,,,,//默认数据库密码为空 Set root 密码?,[Y/n], y ,,,,,,,,,,,,,,,,,,,,,,,,,,//设置新密码 null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null百胜安装实现灯分离及Xcache加速