Where are the Apache Configuration files on Mac?


Here’s where to find httpd.conf on Mac. This is the httpd.conf location on Mac OS X 10.6 Snow Leopard and Mac OS X 10.7 Lion. This article also shows how to make the httpd.conf directory visible in the Mac Finder.

What is Httpd.conf?

Httpd.conf is the Apache web server’s main configuration file. Mac OSX ships with Apache installed. See Apache’s configuration docs for how to configure Apache.

Httpd.conf Location on Mac

On Mac httpd.conf location is in the directory /etc/apache2. You can access this folder through the Mac Finder or through the Mac Terminal.
Checked on OS X 10.7, 10.6.8, 10.6.7.

Httpd.conf Location in Mac Finder

You won’t normally see even the /etc/apache2 directory showing up in the Mac Finder. I tried looking in Macintosh HD, but /etc doesn’t show up.)
I found a tip at Codejacked on how to open hidden files in the Finder.
Here’s how to view httpd.conf’s directory in the Mac’s finder:
  1. In the Finder, click the Go menu, and choose Go to Folder…
  2. Type in /etc/apache2.
  3. Click Go.
The Finder will show the apache2 folder, and in it, you’ll see httpd.conf.

Httpd.conf Location in Mac Terminal

You can also get to the httpd.conf file through a terminal session, which is okay if your comfortable in the Unix shell (bash):
tazpro:~ taz$ cd /etc/apache2
tazpro:apache2 taz$ ls
extra  magic  original users
httpd.conf mime.types other

Can’t Save Httpd.conf?

Httpd.conf is protected by OSX from being edited. If you open it with the TextEdit application for example, you won’t be able to save it. For details to bypass this security, see How to Easily Edit Httpd.conf on Mac.

Restart Apache to Apply Configuration Changes

Don’t forget you will need to restart Apache for your configuration changes in httpd.conf to be applied. To restart Apache on Mac:
  1. Go to the Apple menu and choose System Preferences.
  2. Click on Sharing.
  3. Untick Web Sharing.
  4. Tick Web Sharing.

Installing MySQL server on Mac OS X Lion

ref [1]: http://www.djangoapp.com/blog/2011/07/24/installation-of-mysql-server-on-mac-os-x-lion/
ref [2]: http://dev.mysql.com/downloads/mysql/
ref [3]: http://downloads.mysql.com/archives.php?p=mysql-5.5&o=%28%3F%3Adarwin%7Cosx%29


Installation of MySQL server on Mac OS X Lion



This article is part of Django Installation on Mac OS X Lion
At the time of writing this post, MySQL Server on MySQL site doesn’t have installer package for OS X 10.7 (aka Lion) but 10.6 Package works just fine for 10.7 as well. This may change soon and we may see package for OS X 10.7 as well or may be rename current package to 10.6 & above.
Installing MySQL community server:
  1. Download the latest  64-Bit DMG Archive (Apple Disk Image) from MySQL Site (http://dev.mysql.com/downloads/mysql/). Current latest version is 5.5.14 which I’ll be using to install on my machine.
  2. Mount the Disk Image (I mean open/double-click the DMG file) and install MySQL server by double-clicking the PKG file (in my case mysql-5.5.14-osx10.6-x86_64.pkg) and follow onscreen instructions. ( It will ask for Master password, as it installs MySQL server in /usr/local )
  3. Add /usr/local/mysql/bin to your path by editing .profile file. (Optionally you can create alias to mysql and mysqladmin as mentioned in README File)
  4. You can start MySQL server by running “/usr/local/mysql/bin/mysqld_safe &” from terminal but Disk image you downloaded also consists of Startup Package & Preferences Pane which allows you to start/stop MySQL server from System Preferences and even Automatically Start MySQL Server at Startup.
*Please note /usr/local/mysql is only symlink to /usr/local/mysql-5.5.14-osx10.6-x86_64 which means when you upgrade to new version symlink will be changed to point to new version but won’t be deleting the older version. However you need to copy your data directory to new location to make sure your existing databases are intact post upgrade.
Installing MySQL Startup Scripts & Preferences Pane (OPTIONAL)
  1. Double Click MySQLStartupItem.pkg and Follow on screen instructions (You will be asked for Master Password)
  2. Double Click MySQL.prefPane which will add MySQL to OS X System Preferences and it should like something like below
    MySQL Mac OS X Lion Preferences
    MySQL Mac OS X Lion Preferences
  3. Check Automatically Start MySQL Server on Startup to start MySQL server at boot time.
In next section we will discuss installing phpMyAdmin which will provide us web interface to perform basic MySQL administration tasks on Mac OS X Lion.

教你升級Lion Server版

Ref : http://iphone4.tw/forums/showthread.php?t=140749#top




---------------------------------------------------
軟體名稱:Mac OS X 10.7 Lion
軟體分類:作業系統
官方網站:http://www.apple.com/
安裝資源:Mac App Store
操作等級:▼▽▽▽▽
推薦安裝:▲▲▲▲▲
購買費用:USD$29.99
適用機型:Mac OS 10.6.6 以上版本,Intel Core-Duo2 以上硬體
---------------------------------------------------




---------------------------------------------------
軟體名稱:Mac OS X 10.7 Lion Server
軟體分類:作業系統
官方網站:http://www.apple.com/
安裝資源:Mac App Store
操作等級:▼▽▽▽▽
推薦安裝:▲▲▲▲▲
購買費用:USD$49.99
適用機型:Mac OS 10.6.6 以上版本,Intel Core-Duo2 以上硬體
---------------------------------------------------





首先,當然你要在Mac App Store上架後,購買並下載完成這兩套軟體,都好了之後


在開始之前,請先備份你的系統,備份教學請參考這篇「SuperDuper!備份複製你的硬碟」,或是這篇「Carbon Copy Cloner整顆備份你的硬碟

當你一切都備份好之後,就可以點擊兩下開始升級安裝囉




接著就開始安裝囉



同意使用者條款



選擇升級安裝磁碟



接著就開始跑囉




經過了漫長的等待,尤其若你是把server放在機房的人,那更是心理發毛

沒錯,基本上server這種東西用的好好的,不需要升級的

只是剛好吉米有空著一台Mac Mini Server,所以就來做示範給大家看


等了一段時間,因為他安裝好之後要重新開機並且安裝套件

要全部都好之後




你才會看到這個歡迎介面,而目前選繁體中文也沒用,最後安裝好之後,還是要去系統偏好設定中設定


而很大一個重點是,當你在server上面安裝Lion的時候,他會自動檢查你有沒有下載Server的軟體,兩個都有才開始裝

所以裝好之後就直接是Server版了,而不是一般的Lion版本



接著設定鍵盤



輸入你的企業資訊、管理員信箱



接著就開始讓他設定囉



設定好重開機之後,就會看到你的登入畫面,輸入帳號密碼即可



第一次進來,你會發現其實整套系統已經是Server版了



來,驗明正聲一下,這是吉米從朋友手上買到的Mac Mini 8GB Server版



這邊還沒資訊



8GB的RAM



接著請去「系統偏好設定」中設定「語言與文字」中,將繁體中文拉到最頂端就有中文啦


那接著要怎麼去找Server Admin的程式來設定這台Server呢?




現在都在這個Server軟體裡面啦,這就是要你另外買的,還記得嗎?

所以點擊他兩下,他就算是Lion的Server Admin軟體囉



這時候你可以選擇要管理本機,還是其他機器



登入後,使用者帳號、密碼、服務....都全部都在這裡了



一如以往,Mac的server可以設定的是少之又少




例如這是設定檔案分享的地方




檔案分享細部設定



這是設定Web Server的地方,對,就這樣,上面一個開關,然後問你要不要跑php,最後是網站設定




你以為網站設定很難嗎?也是基本設定而已,就這樣




Mail Server更是簡單



iChat Server



VPN



所以啊,就這樣,Server就設定升級好囉

有沒有很簡單啊?

真的超簡單

最後




再去這裡下載Server Admin Tools就完成啦
http://support.apple.com/kb/DL1419



以上教學是「升級」原本的Snow Leopard Server,變成Lion Server的教學

虹光大成就-密教灌頂(一)