2021-11-09 09:58:21
This commit is contained in:
8
bonus.sh
8
bonus.sh
@@ -6,7 +6,7 @@
|
|||||||
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
# By: gbaconni@student.42lausanne.ch +#+ +:+ +#+ #
|
||||||
# +#+#+#+#+#+ +#+ #
|
# +#+#+#+#+#+ +#+ #
|
||||||
# Created: 2021/11/07 14:23:18 by gbaconni #+# #+# #
|
# Created: 2021/11/07 14:23:18 by gbaconni #+# #+# #
|
||||||
# Updated: 2021/11/09 09:18:25 by gbaconni ### ########.fr #
|
# Updated: 2021/11/09 09:58:20 by gbaconni ### ########.fr #
|
||||||
# #
|
# #
|
||||||
# **************************************************************************** #
|
# **************************************************************************** #
|
||||||
|
|
||||||
@@ -45,9 +45,11 @@ ft_lighttpd ()
|
|||||||
if ! dpkg --get-selections | grep -qP '^lighttpd\t+install'
|
if ! dpkg --get-selections | grep -qP '^lighttpd\t+install'
|
||||||
then
|
then
|
||||||
apt-get install -qq -y lighttpd
|
apt-get install -qq -y lighttpd
|
||||||
sed -i -r 's|^(server.document-root[^=]*=).*\1 "/usr/share/wordpress"|g' /etc/lighttpd/lighttpd.conf
|
|
||||||
sed -i -r 's/80/4243/g' /etc/lighttpd/lighttpd.conf
|
sed -i -r 's/80/4243/g' /etc/lighttpd/lighttpd.conf
|
||||||
sed -i -r 's/443/4244/g' /etc/lighttpd/conf-available/10-ssl.conf
|
sed -i -r 's/443/4244/g' /etc/lighttpd/conf-available/10-ssl.conf
|
||||||
|
sed -i -r 's|"bin-path"([^=]*=>).*|"host"\1 "127.0.0.1",|g' /etc/lighttpd/conf-available/15-fastcgi-php.conf
|
||||||
|
sed -i -r 's|"socket"([^=]*=>).*|"port"\1 "9000",|g' /etc/lighttpd/conf-available/15-fastcgi-php.conf
|
||||||
|
sed -i -r 's|^(server.document-root[^=]*=).*|\1 "/usr/share/wordpress"|g' /etc/lighttpd/lighttpd.conf
|
||||||
cat \
|
cat \
|
||||||
/etc/ssl/certs/ssl-cert-snakeoil.pem \
|
/etc/ssl/certs/ssl-cert-snakeoil.pem \
|
||||||
/etc/ssl/private/ssl-cert-snakeoil.key \
|
/etc/ssl/private/ssl-cert-snakeoil.key \
|
||||||
@@ -66,7 +68,7 @@ ft_php ()
|
|||||||
then
|
then
|
||||||
apt-get install -qq -y php php-fpm php-mysql
|
apt-get install -qq -y php php-fpm php-mysql
|
||||||
sed -i -r 's/^;?(cgi.fix_pathinfo)=.*/\1=1/' /etc/php/7.4/fpm/php.ini
|
sed -i -r 's/^;?(cgi.fix_pathinfo)=.*/\1=1/' /etc/php/7.4/fpm/php.ini
|
||||||
sed -i -r 's|(listen =).*|\1 /run/php/php-fpm.sock|' /etc/php/7.4/fpm/pool.d/www.conf
|
sed -i -r 's|(listen =).*|\1 127.0.0.1:9000|' /etc/php/7.4/fpm/pool.d/www.conf
|
||||||
systemctl restart php7.4-fpm
|
systemctl restart php7.4-fpm
|
||||||
fi
|
fi
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
Reference in New Issue
Block a user