1. Download lastest version from apache.org and unpack.
2. Entering the extracted folder and change the file configure.aspx:
//original
if test "$APXS" = ""; then
APXS=`which apxs 2>/dev/null`
fi;
//changed
if test "$APXS" = ""; then
APXS=`which /opt/lampp/bin/apxs 2>/dev/null`
fi;
3. Open Terminal, stop Xampp server, navigate to the extracted folder and run the commands:
./configure.apxs
sudo make
sudo make install
4. Open file lampp/etc/extra/httpd-vhosts.conf and submit FCGID setting:
<IfModule fcgid_module>
FcgidInitialEnv PHPRC "/opt/lampp/etc/"
FcgidInitialEnv SystemRoot "/"
# FcgidInitialEnv SystemDrive "C:"
FcgidInitialEnv TEMP "/opt/lampp/temp"
FcgidInitialEnv TMP "/opt/lampp/temp"
# FcgidInitialEnv windir "C:/WINDOWS"
FcgidIOTimeout 64
FcgidConnectTimeout 16
FcgidMaxRequestsPerProcess 1000
FcgidMaxProcesses 3
FcgidMaxRequestLen 8131072
# Location php.ini:
# FcgidInitialEnv PHPRC "/opt/lampp/htdocs"
FcgidInitialEnv PHP_FCGI_MAX_REQUESTS 1000
<Files ~ "\.php$">
Options Indexes FollowSymLinks ExecCGI
AddHandler fcgid-script .php
FcgidWrapper "/opt/lampp/bin/php-cgi-5.5.30" .php
</Files>
</IfModule>
5. Start Xampp server. Create a phpinfo.php file with the contents:
<?php phpinfo();?>
then retrieve the browser and search for the line "Find Server API". If you did everything right, the line looks approximately like this:
Server API CGI/FastCGI
Không có nhận xét nào:
Đăng nhận xét