mirror of
https://github.com/ScoopInstaller/Main.git
synced 2025-11-01 14:21:19 +00:00
Apache 2.4.6 (move PHP setup to gist)
This commit is contained in:
parent
d2fa5a7ef9
commit
c679ef542b
20
apache.json
20
apache.json
@ -18,29 +18,9 @@
|
||||
"bin\\rotatelogs.exe"
|
||||
],
|
||||
"post_install": "
|
||||
|
||||
# set directory in httpd.conf
|
||||
$conf = \"$dir/conf/httpd.conf\"
|
||||
$root=(scoop which httpd | split-path -res -par | split-path -par) -replace '\\\\', '/';
|
||||
(gc $conf) | % { $_ -replace 'c:/Apache24', \"$root\" } | sc $conf
|
||||
|
||||
# enable php if it's installed
|
||||
$php = scoop which php
|
||||
if($lastexitcode -eq 0) {
|
||||
'enabling PHP handler...'
|
||||
$phpmodule = \"$(split-path $php -resolve)\\php5apache2_4.dll\"
|
||||
if(test-path $phpmodule) {
|
||||
$lines = gc $conf
|
||||
$phpmodule = $phpmodule -replace '\\\\', '/'
|
||||
\"
|
||||
# php setup
|
||||
LoadModule php5_module '$phpmodule'
|
||||
AddHandler application/x-httpd-php .php
|
||||
PHPIniDir `\"$(split-path $phpmodule)`\"
|
||||
\" | out-file $conf -append -encoding utf8
|
||||
} else {
|
||||
\"couldn't find $phpmodule\"
|
||||
}
|
||||
}
|
||||
"
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user