Ubuntu下重启apache

回复 星标
更多
Ubuntu下重启apache
.
.
.
.
.
.

取决于你的PHP运行模式,如果是fastcgi,重启php-fpm即可,如果是apache mod,需要重启apache服务

比较常见的:service apache2 restart

假设你apahce安装目录为/usr/local/apache2
apahce启动命令:/usr/local/apache2/bin/apachectl start apaceh
apache停止命令:/usr/local/apache2/bin/apachectl stop
apache重启命令:/usr/local/apache2/bin/apachectl restart
重启时不中断当前的连接,则应:/usr/local/sbin/apachectl graceful

如果apache是linux服务
service httpd start 启动
service httpd restart 重新启动
service httpd stop 停止服务

Ubuntu系统
启动 # sudo /etc/init.d/apache2 start
停止 # sudo /etc/init.d/apache2 stop
重启 # sudo /etc/init.d/apache2 restart

此帖已被锁定,无法回复
新窗口打开 关闭