//web 服务器-启动和停止
//apache
service httpd start //启动
service httpd restart //重新启动
service httpd stop //停止服务
sudo /etc/init.d/apache2 start
sudo /etc/init.d/apache2 stop


//ngix
service nginx start //启动
service nginx stop //重新启动
service nginx restart //停止服务
sudo /etc/init.d/nginx start
sudo /etc/init.d/nginx stop


//查看web服务器所属的用户和组
debian  
cat /etc/apache2/envvars   //export APACHE_RUN_USER=www-data    export APACHE_RUN_GROUP=www-data
cat /usr/local/nginx/conf/nginx.conf | grep user


//给目录赋www权限
sudo chown www-data.www-data -R *

 

posted on 2018-04-10 15:45  fonyer  阅读(148)  评论(0编辑  收藏  举报