small fixes
After testing and before release: - now we don't need to change cgi.fix_pathinfo in PHP. - fixed update process. - better wp-admin security. - fixed auto-stack installation process
This commit is contained in:
parent
4119e01829
commit
946da7128b
5 changed files with 17 additions and 15 deletions
|
@ -3,7 +3,7 @@ source /opt/webinoly/lib/general
|
|||
|
||||
|
||||
app_version() {
|
||||
local app_ver="1.5.0-beta"
|
||||
local app_ver="1.5.0"
|
||||
echo $app_ver
|
||||
}
|
||||
svr_version() {
|
||||
|
@ -303,7 +303,9 @@ php_optim() {
|
|||
local maxuploads="100"
|
||||
fi
|
||||
|
||||
sudo sed -i '/cgi.fix_pathinfo=/c\cgi.fix_pathinfo=0' /etc/php/$ver/fpm/php.ini
|
||||
# Not needed anymore! https://serverfault.com/questions/627903/is-the-php-option-cgi-fix-pathinfo-really-dangerous-with-nginx-php-fpm
|
||||
#sudo sed -i '/cgi.fix_pathinfo=/c\cgi.fix_pathinfo=0' /etc/php/$ver/fpm/php.ini
|
||||
|
||||
sudo sed -i '/memory_limit =/c\memory_limit = 128M' /etc/php/$ver/fpm/php.ini
|
||||
sudo sed -i '/max_execution_time =/c\max_execution_time = 300' /etc/php/$ver/fpm/php.ini
|
||||
sudo sed -i '/expose_php =/c\expose_php = Off' /etc/php/$ver/fpm/php.ini
|
||||
|
@ -530,7 +532,7 @@ swap_create() {
|
|||
sudo sed -i "/LABEL.*/a \/swapfile none swap sw 0 0" /etc/fstab
|
||||
|
||||
echo 10 | sudo tee /proc/sys/vm/swappiness
|
||||
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
|
||||
echo vm.swappiness = 10 | sudo tee -a /etc/sysctl.conf
|
||||
|
||||
# Swap created by Webinoly - so we should remove it in uninstall
|
||||
conf_write swap-owner webinoly
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
echo "${red}"
|
||||
echo "Your server configuration will be updated and all changes you manually made will be lost!!"
|
||||
echo "${blu}Current server version '$oldver' will be upgraded to the newest '$newver'"
|
||||
echo "Wait...${end}"
|
||||
echo "Your server configuration will be updated and all changes you manually did will be lost!!"
|
||||
echo "${blu}Current server version 'v$oldver' will be upgraded to the newest 'v$newver'. Wait...${end}"
|
||||
|
||||
onezero_to_oneone() {
|
||||
|
||||
|
@ -40,6 +39,7 @@ must-staple = True" | tee -a /etc/letsencrypt/cli.ini
|
|||
done
|
||||
fi
|
||||
|
||||
# Update nginx and php conf files
|
||||
sudo webinoly -server-update
|
||||
|
||||
}
|
||||
|
@ -47,5 +47,5 @@ must-staple = True" | tee -a /etc/letsencrypt/cli.ini
|
|||
# Version numbers without point
|
||||
[[ ${newver//.} -ge 11 ]] && onezero_to_oneone > /dev/null 2>&1 &
|
||||
|
||||
echo "${blu}Done!"
|
||||
|
||||
echo "${gre}Your server-configuration has been successfully updated!${end}"
|
||||
|
|
|
@ -244,7 +244,7 @@ elif [ "$type" == "-parked" ]; then
|
|||
# Reverse proxy
|
||||
elif [[ "$type" == "-proxy" ]]; then
|
||||
createsite
|
||||
sudo sed -i '/php.conf;/d' /etc/nginx/sites-available/$domain
|
||||
sudo sed -i '/include /d' /etc/nginx/sites-available/$domain
|
||||
sudo sed -i '/root /d' /etc/nginx/sites-available/$domain
|
||||
sudo sed -i '/index /d' /etc/nginx/sites-available/$domain
|
||||
sudo sed -i '/error_log /r /opt/webinoly/templates/template-site-proxy' /etc/nginx/sites-available/$domain
|
||||
|
|
|
@ -33,11 +33,11 @@ elif [[ $opt == "-server-update" || $opt == "-server-reset" ]]; then
|
|||
if [[ $(conf_read nginx-optim) == "true" && ( $value == "nginx" || $value = "all" ) ]]; then
|
||||
sudo rm -rf /etc/nginx/common
|
||||
sudo rm -rf /etc/nginx/conf.d/*
|
||||
linux_purge > /dev/null 2>&1 &
|
||||
linux_purge
|
||||
nginx_optim > /dev/null 2>&1 &
|
||||
echo "${gre}Nginx has been updated successfully!${end}"
|
||||
echo "${gre}Nginx settings has been updated successfully!${end}"
|
||||
elif [[ $(conf_read nginx-optim) != "true" && ( $value == "nginx" || $value = "all" ) ]]; then
|
||||
echo "${red}Seems like Nginx is not installed in your server!${end}"
|
||||
echo "${red}Nginx settings couldn't been updated, seems like is not installed in your server!${end}"
|
||||
fi
|
||||
|
||||
# Regenerate PHP conf files
|
||||
|
@ -46,9 +46,9 @@ elif [[ $opt == "-server-update" || $opt == "-server-reset" ]]; then
|
|||
sudo cat /opt/webinoly/templates/source/www.conf > /etc/php/$(conf_read php-ver)/fpm/pool.d/www.conf
|
||||
sudo rm /etc/php/$(conf_read php-ver)/fpm/pool.d/debug.conf
|
||||
php_optim
|
||||
echo "${gre}PHP has been updated successfully!${end}"
|
||||
echo "${gre}PHP settings has been updated successfully!${end}"
|
||||
elif [[ $(conf_read php-optim) != "true" && ( $value == "php" || $value = "all" ) ]]; then
|
||||
echo "${red}Seems like PHP is not installed in your server!${end}"
|
||||
echo "${red}PHP settings couldn't been updated, seems like is not installed in your server!${end}"
|
||||
fi
|
||||
|
||||
|
||||
|
|
4
weby
4
weby
|
@ -90,8 +90,8 @@ conf_write app-version $webyversion
|
|||
|
||||
|
||||
# Stack installation
|
||||
[[ $setup -gt 0 && $setup -lt 3 ]] && stack -nginx
|
||||
[[ $setup -gt 1 && $setup -lt 3 ]] && stack -php
|
||||
[[ $setup -gt 0 && $setup -le 3 ]] && stack -nginx
|
||||
[[ $setup -gt 1 && $setup -le 3 ]] && stack -php
|
||||
[[ $setup == 3 ]] && stack -mysql
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue