特黄特色三级在线观看免费,看黄色片子免费,色综合久,欧美在线视频看看,高潮胡言乱语对白刺激国产,伊人网成人,中文字幕亚洲一碰就硬老熟妇

學(xué)習(xí)啦 > 學(xué)習(xí)電腦 > 操作系統(tǒng) > Linux教程 > Linux系統(tǒng)重啟apache服務(wù)命令詳解

Linux系統(tǒng)重啟apache服務(wù)命令詳解

時(shí)間: 佳洲1085 分享

Linux系統(tǒng)重啟apache服務(wù)命令詳解

  Linux系統(tǒng)中apache是重要的一個(gè)服務(wù),掌握基本操作尤其重要。下面由學(xué)習(xí)啦小編為大家整理了Linux系統(tǒng)重啟apache服務(wù)命令詳解,希望對(duì)大家有幫助!

  Linux系統(tǒng)重啟apache服務(wù)命令詳解

  基本的操作方法:

  本文假設(shè)你的apahce安裝目錄為/usr/local/apache2,這些方法適合任何情況

  apahce啟動(dòng)命令:

  推薦/usr/local/apache2/bin/apachectl start apaceh啟動(dòng)

  apache停止命令

  /usr/local/apache2/bin/apachectl stop 停止

  apache重新啟動(dòng)命令:

  /usr/local/apache2/bin/apachectl restart 重啟

  要在重啟 Apache 服務(wù)器時(shí)不中斷當(dāng)前的連接,則應(yīng)運(yùn)行:

  /usr/local/sbin/apachectl graceful

  如果apache安裝成為linux的服務(wù)的話,可以用以下命令操作:

  service httpd start 啟動(dòng)

  service httpd restart 重新啟動(dòng)

  service httpd stop 停止服務(wù)

  Linux系統(tǒng)為Ubuntu時(shí)重啟apache

  一、Start Apache 2 Server /啟動(dòng)apache服務(wù)

  # /etc/init.d/apache2 start

  or

  $ sudo /etc/init.d/apache2 start

  二、 Restart Apache 2 Server /重啟apache服務(wù)

  # /etc/init.d/apache2 restart

  or

  $ sudo /etc/init.d/apache2 restart

  三、Stop Apache 2 Server /停止apache服務(wù)

  # /etc/init.d/apache2 stop

  or

  $ sudo /etc/init.d/apache2 stop

  參考資料:關(guān)于Ubuntu配置文件apache2 httpd.conf位置

  關(guān)于ubuntu配置文件,嚴(yán)格地說Ubuntu的Apache(或者應(yīng)該說Linux下的Apache?我不清楚其他發(fā)行版的 apache軟件包)的配置文件是 /etc/apache2/apache2.conf,Apache在啟動(dòng)時(shí)會(huì)自動(dòng)讀取這個(gè)文件的配置信息。而其他的一些配置文件,如 httpd.conf等,則是通過Include指令包含進(jìn)來。在apache2.conf中可以找到這些Include行:

  引用

  # Include module configuration:

  Include /etc/apache2/mods-enabled/*.load

  Include /etc/apache2/mods-enabled/*.conf

  # Include all the user configurations:

  Include /etc/apache2/httpd.conf

  # Include ports listing

  Include /etc/apache2/ports.conf

  ……

  # Include generic snippets of statements

  Include /etc/apache2/conf.d/

  # Include the virtual host configurations:

  Include /etc/apache2/sites-enabled/

  結(jié)合注釋,可以很清楚地看出每個(gè)配置文件的大體作用。當(dāng)然,你完全可以把所有的設(shè)置放在apache2.conf或者h(yuǎn)ttpd.conf或者任何一個(gè)配置文件中。Apache2的這種劃分只是一種比較好的習(xí)慣。

  安裝完Apache后的最重要的一件事就是要知道Web文檔根目錄在什么地方,對(duì)于Ubuntu而言,默認(rèn)的是/var/www。怎么知道 的呢?apache2.conf里并沒有DocumentRoot項(xiàng),httpd.conf又是空的,因此肯定在其他的文件中。經(jīng)過搜索,發(fā)現(xiàn)在 /etc /apache2/sites-enabled/000-default中,里面有這樣的內(nèi)容:

  引用

  NameVirtualHost *

  <VirtualHost *>

  ServerAdmin webmaster @localhost

  DocumentRoot /var/www/

3644372