在mac下怎麼配置web環境(php)

來源:互聯網
上載者:User

標籤:file   建立   xampp   admin   環境   host   symlink   bsp   conf   

1, 安裝PHP+apach+mysql(xampp)

2, 在目錄下建一個新檔案夾   : 我是在Users/個人目錄/workspace3, 開啟/Applications/XAMPP/xamppfiles/etc/httpd.conf,

    添加如下內容:

 # XAMPP

 Include etc/extra/httpd-xampp.conf

 Include "/Applications/XAMPP/xamppfiles/apache2/conf/httpd.conf"

 Include "/Users/wuzeguo/workspace/www_conf/*"

 

4, 在workspace下建立檔案夾www_conf5, 修改host檔案(/etc/hosts)6, 在www_conf下添加conf檔案(以項目名字命名)如項目名為hani,則名為hani.conf   <VirtualHost *:80>

 ServerAdmin [email protected]

  #項目地址

 DocumentRoot /Users/wuzeguo/workspace/hani 

 directoryIndex  index.html index.php index.htm index.shtml login.php

 ServerName www.hani.com

 ErrorLog "logs/mhd_error.log"

 CustomLog "logs/mhd_error_common.log" common

 

 <Directory /Users/wuzeguo/workspace/hani>

 Options FollowSymLinks Indexes

 AllowOverride all 

 #Order allow,deny

 #Allow from all 

 Require all granted

 </Directory>

 </VirtualHost>

    

在mac下怎麼配置web環境(php)

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.