Skip to content

Commit 6cd03c1

Browse files
committed
CentOS 7: increase number of open files
there's per package limitation of 100 web sites. So, vesta should limit number of sites anyway. However, if one would want to have, for example, 350 web sites, he will be limited by OS settings. so, lets remove limitation on the OS level and let vesta control things
1 parent 940421f commit 6cd03c1

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

install/vst-install-rhel.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -851,6 +851,11 @@ if [ "$nginx" = 'yes' ]; then
851851
wget $vestacp/logrotate/nginx -O /etc/logrotate.d/nginx
852852
echo > /etc/nginx/conf.d/vesta.conf
853853
mkdir -p /var/log/nginx/domains
854+
if [ "$release" -eq 7 ]; then
855+
mkdir /etc/systemd/system/nginx.service.d/
856+
echo "[Service]" > /etc/systemd/system/nginx.service.d/limits.conf
857+
echo "LimitNOFILE=500000" >> /etc/systemd/system/nginx.service.d/limits.conf
858+
fi
854859
chkconfig nginx on
855860
service nginx start
856861
check_result $? "nginx start failed"
@@ -889,6 +894,11 @@ if [ "$apache" = 'yes' ]; then
889894
chmod a+x /var/log/httpd
890895
mkdir -p /var/log/httpd/domains
891896
chmod 751 /var/log/httpd/domains
897+
if [ "$release" -eq 7 ]; then
898+
mkdir /etc/systemd/system/httpd.service.d/
899+
echo "[Service]" > /etc/systemd/system/httpd.service.d/limits.conf
900+
echo "LimitNOFILE=500000" >> /etc/systemd/system/httpd.service.d/limits.conf
901+
fi
892902
chkconfig httpd on
893903
service httpd start
894904
check_result $? "httpd start failed"

0 commit comments

Comments
 (0)