關於 PHP, Linux, Open Source 及個人生活記載的網誌。
RSS icon
  • 找出 Apache 設定檔

    Posted on April 29th, 2007 Sam Tang 2 comments

    各個 Linux Distro 及 control panels 會將 Apache 的設定檔放到不同位置,另外自行編譯及安裝 Apache,預設值會將設定檔放在 /etc/httpd,但編譯時可以指定到其他的位置及檔案名稱。(預設的設定檔名為 httpd.conf)

    以下是幾個找出 Apache 設定檔的方法:

    1. httpd 指令:

    httpd -v | grep HTTPD_ROOT

    2. find 及 locate 指令:

    因為用 find 要等一段時間,所以建議在使用 find 指令前先試試用 locate 指令:

    locate httpd.conf

    如果找不到的話,便要用 find 指令來找:

    find / -name ‘httpd.conf’ -print

    3. cPanel 或 Plesk Control Panel

    如果是使用 cPanel 或 Plesk Control Panel,會放到 /home/username/ 或 /var/www/vhosts/ 目錄。


     

    2 responses to “找出 Apache 設定檔”

    1. 那麼,請問如何找出MySQL的設定檔呢?

    2. 我不知道找出 mysql 設定檔的方法,但一般上會是 /etc/my.cnf 或 /etc/mysql/my.cnf

    Leave a reply

    *
    To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
    Click to hear an audio file of the anti-spam word