에도 불구하고, 여기에 예를입니다 (테스트되지 않은) 아파치 CGI 구성 :
이
(미안 나도 몰라 nginx를)
<IfModule mod_fcgid.c>
IdleTimeout 3600
ProcessLifeTime 7200
MaxProcessCount 64
DefaultMaxClassProcessCount 8
IPCConnectTimeout 300
IPCCommTimeout 7200
BusyTimeout 300
<FilesMatch ".+\.ph(p[345]?|t|tml)$">
SetHandler application/x-httpd-php
</FilesMatch>
ScriptAlias /php-5.5.10-bin/ /opt/php/5.5.10/bin/
ScriptAlias /php-5.4.17-bin/ /opt/php/5.4.26/bin/
ScriptAlias /php-5.3.27-bin/ /opt/php/5.3.28/bin/
ScriptAlias /php-5.2.17-bin/ /opt/php/5.2.17/bin/
<Directory "/opt/php">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
<FilesMatch ".+\.hh$">
SetHandler application/x-httpd-hhvm
</FilesMatch>
ScriptAlias /hhvm-2.4.2-bin/ /opt/hhvm/2.4.2/bin/
<Directory "/opt/hhvm">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
</IfModule>
그리고 가상 호스트 :
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/deployments/www.example.com/public
<Directory /var/deployments/www.example.com>
Options -Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
Action application/x-httpd-php /php-5.5.10-bin/php-cgi
Action application/x-httpd-hhvm /hhvm-2.4.2-bin/hhvm-cgi
</Directory>
ErrorLog /var/deployments/$serverName/log/www.example.com.error.log
LogLevel warn
CustomLog /var/deployments/$serverName/log/www.example.com.access.log combined
</VirtualHost>
CGI를 사용하면 파일 유형에 대한 처리기를 추가하기 만하면됩니다. – Petah