php+mysql+apache

來源:互聯網
上載者:User

標籤:apach   知識   apache2   sof   訪問   apache   tle   cmd   host   

1.apache2.4配置

將下載的apache壓縮包解壓至任意位置,在conf檔案夾中找到httpd.conf,開啟

(1)將ServerRoot的值改為apache根目錄

(2)將ServerName改為你自己的網域名稱(若為本機測試則為localhost)

(3)將DocumentRoot的值改為你的網站根目錄(網站根目錄需自己建立),緊隨DocumentRoot的一行或幾行中有個<Directory "c:/XXX">,這個目錄也要改為網站根目錄

(4)將ScriptAlias /cgi-bin/ "c:/Apache24/cgi-bin/"改為apache根目錄下的cgi-bin檔案夾,緊隨ScriptAlias的幾行中有個<Directory "c:/Apache24/cgi-bin">,將其也改為apache根目錄下的cgi-bin檔案夾

測試:

(1)在apache根目錄下的bin目錄中啟動cmd,輸入httpd,啟動apache服務

(2)將apache加入系統服務

①先關閉(1)開啟的服務

②在apache根目錄下的bin目錄中啟動cmd,輸入httpd.exe -k install -n "Apache24"

(2)在網站根目錄下建立index.html,用瀏覽器訪問,若能正常顯示該index.html內容則表明apache已正確安裝

php+mysql+apache

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.