mirror of
https://github.com/akatsukiro/lsky-pro-install-script.git
synced 2025-06-08 05:53:04 +08:00
fix: RHEL系的apache模组启用与加载
This commit is contained in:
parent
d8fb28c930
commit
521ec6ea0b
33
install.sh
33
install.sh
@ -122,23 +122,32 @@ install_apache() {
|
|||||||
if [[ $systemFlag == "1" ]]; then
|
if [[ $systemFlag == "1" ]]; then
|
||||||
wget -O /usr/share/keyrings/apache2.gpg https://packages.sury.org/apache2/apt.gpg
|
wget -O /usr/share/keyrings/apache2.gpg https://packages.sury.org/apache2/apt.gpg
|
||||||
echo "deb [signed-by=/usr/share/keyrings/apache2.gpg] https://packages.sury.org/apache2/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/apache2.list
|
echo "deb [signed-by=/usr/share/keyrings/apache2.gpg] https://packages.sury.org/apache2/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/apache2.list
|
||||||
apt update && apt install apache2 -y
|
|
||||||
elif [[ $systemFlag == "2" ]]; then
|
elif [[ $systemFlag == "2" ]]; then
|
||||||
add-apt-repository ppa:ondrej/apache2
|
add-apt-repository ppa:ondrej/apache2
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $systemFlag == "1" ]] || [[ $systemFlag == "2" ]]; then
|
||||||
apt update && apt install apache2 -y
|
apt update && apt install apache2 -y
|
||||||
|
a2enconf php8.1-fpm
|
||||||
|
a2enmod proxy_fcgi
|
||||||
|
a2enmod headers
|
||||||
|
a2enmod http2
|
||||||
|
a2enmod remoteip
|
||||||
|
a2enmod ssl
|
||||||
|
a2enmod rewrite
|
||||||
|
a2enmod expires
|
||||||
|
systemctl restart apache2
|
||||||
|
systemctl restart php8.1-fpm
|
||||||
elif [[ $systemFlag == "3" ]]; then
|
elif [[ $systemFlag == "3" ]]; then
|
||||||
dnf install httpd -y
|
dnf install httpd -y
|
||||||
fi
|
ln -s /etc/httpd/conf.d/php8.1-fpm.conf /etc/httpd/conf.modules.d/15-php8.1-fpm.conf
|
||||||
a2enconf php8.1-fpm
|
modules=("proxy_fcgi" "headers" "http2" "remoteip" "ssl" "rewrite" "expires")
|
||||||
a2enmod proxy_fcgi
|
for module in "${modules[@]}"; do
|
||||||
a2enmod headers
|
echo "LoadModule ${module}_module modules/mod_${module}.so" > /etc/httpd/conf.modules.d/10-${module}.conf
|
||||||
a2enmod http2
|
done
|
||||||
a2enmod remoteip
|
systemctl restart httpd
|
||||||
a2enmod ssl
|
systemctl restart php-fpm.service
|
||||||
a2enmod rewrite
|
fi
|
||||||
a2enmod expires
|
|
||||||
systemctl restart apache2
|
|
||||||
systemctl restart php8.1-fpm
|
|
||||||
}
|
}
|
||||||
|
|
||||||
install_maraidb() {
|
install_maraidb() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user