

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# PHP App Server Layer 參考
<a name="layers-server-php"></a>

**重要**  
 AWS OpsWorks Stacks 此服務已於 2024 年 5 月 26 日終止，並已針對新客戶和現有客戶停用。我們強烈建議客戶盡快將其工作負載遷移至其他解決方案。如果您對遷移有任何疑問，請透過 [AWS re：Post](https://repost.aws/) 或透過 [AWS Premium Support](https://aws.amazon.com/support) 聯絡 AWS 支援 團隊。

**注意**  
此 layer 僅適用於 Linux 類型堆疊。

PHP App Server layer 透過搭配 mod\$1php 使用 [Apache2](http://httpd.apache.org/) 來支援 PHP 應用程式伺服器。

**Short name: (簡短名稱：)** php-app

**相容性：**PHP App Server layer 與下列 layer 相容：Custom、db-master、memcached、 monitoring-master 和 rails-app。

**開放連接埠：**PHP App Server layer 允許公開存取連接埠 22 (SSH)、80 (HTTP)、443 (HTTPS) 和來自負載平衡器的所有連接埠。

**Autoassign Elastic IP addresses: (自動指派彈性 IP 地址：)** 預設為關閉

**Default EBS volume: (預設 EBS 磁碟區：)** 否

**Default security group: (預設安全群組：)** AWS-OpsWorks-PHP-App-Server

**Setup recipes: (安裝配方：)**
+  opsworks\$1initial\$1setup
+ ssh\$1host\$1keys
+ ssh\$1users
+ mysql::client
+ dependencies
+ ebs
+ opsworks\$1ganglia::client
+ mysql::client
+ dependencies
+ mod\$1php5\$1apache2 

**Configure recipes: (設定配方：)**
+ opsworks\$1ganglia::configure-client
+ ssh\$1users
+ agent\$1version
+ mod\$1php5\$1apache2::php
+ php::configure 

**Deploy recipes: (部署配方：)**
+ deploy::default
+ deploy::php 

**Undeploy recipes: (解除部署配方：)**
+ deploy::php-undeploy

**Shutdown recipes: (關機配方：)**
+ opsworks\$1shutdown::default
+ apache2::stop 

**Installation: (安裝：)**
+  OpsWorks Stacks 使用執行個體的套件安裝程式，將 Apache2、mod\$1php 和相關聯的日誌檔案安裝到其預設位置。如需安裝的詳細資訊，請參閱 [Apache](http://httpd.apache.org/)。如需記錄的詳細資訊，請參閱 [Log Files](http://httpd.apache.org/docs/2.2/logs.html)。