HEX
Server: nginx/1.18.0
System: Linux proba.drlaca.appboxes.co 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64
User: appbox (1000)
PHP: 7.4.3-4ubuntu2.29
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/124/root/scripts/nginx_php7.sh
#!/bin/bash
echo "**************************************************************"
echo "*              Installing NGINX & PHP-FPM 7                  *"
echo "**************************************************************"

echo "Creating directories"
mkdir -p /home/appbox/config/nginx/sites-enabled
mkdir -p /home/appbox/config/nginx/modules-enabled
mkdir -p /home/appbox/config/php-fpm/pool.d
mkdir -p /home/appbox/logs/nginx
mkdir -p /home/appbox/public_html
mkdir -p /run/php

# Move Sources
echo "Moving sources"
mv /sources/nginx.conf /home/appbox/config/nginx/nginx.conf
mv /sources/default-site.conf /home/appbox/config/nginx/sites-enabled/default-site.conf
mv /sources/php-fpm.conf /home/appbox/config/php-fpm/php-fpm.conf
mv /sources/www.conf /home/appbox/config/php-fpm/pool.d/www.conf

# Copy NGINX fastcgi_params
echo "Setting up NGINX"
cp /etc/nginx/fastcgi_params /home/appbox/config/nginx/fastcgi_params

# Set php vars
echo "Set php vars"
cat << EOF >> /etc/php/7.4/fpm/conf.d/20-docker.ini
cgi.fix_pathinfo=0
upload_max_filesize = 20G
post_max_size = 1G
variables_order = "EGPCS"
memory_limit = 2G
display_errors = 0
log_errors = 1
EOF

# Setup NGINX Daemon
echo "Setting up NGINX daemon"
mkdir -p /etc/service/nginx
cat << EOF >> /etc/service/nginx/run
#!/bin/sh
exec /usr/sbin/nginx -c /home/appbox/config/nginx/nginx.conf -g "daemon off;"
EOF
chmod +x /etc/service/nginx/run

# Setup PHP-FPM Daemon
echo "Setting up PHP-FPM daemon"
mkdir -p /etc/service/phpfpm
cat << EOF >> /etc/service/phpfpm/run
#!/bin/sh
exec /usr/sbin/php-fpm7.4 --nodaemonize --fpm-config /home/appbox/config/php-fpm/php-fpm.conf
EOF
chmod +x /etc/service/phpfpm/run

echo "Finished installing NGINX & PHP-FPM"