webserver的安装

apache的安装

安装  yum install httpd

启动  service httpd start

停止  service httpd stop


查看是否启动 : ps -ef | grep httpd

配置虚拟主机

<VirtualHost *:80>
ServerName www.2bphp.com
DocumentRoot /data/apache
<Directory "/data/apache">
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*).htmp index.php
</IfModule>
</Directory>

</VirtualHost>

</VirtualHost>

nginx的安装

安装   yum install nginx 

启动  service nginx start

重载  service nginx reload

停止  service nginx stop

猜你喜欢

转载自www.cnblogs.com/aln0825/p/9747729.html