HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vps-320ddf0a 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: lamphim (1008)
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: //usr/share/fastpanel2/bin/install-web.sh
#!/bin/bash

function InstallNginxRepository {
    Debug "Configuring nginx repository.\n"

    Debug "Getting repository key from http://nginx.org/."
    wget -q http://nginx.org/keys/nginx_signing.key -O - |apt-key add - || InstallationFailed

    Debug "Adding repository file /etc/apt/sources.list.d/nginx.list"
    echo "deb [arch=${ARCH}] http://nginx.org/packages/${FAMILY}/ ${OS} nginx" > /etc/apt/sources.list.d/nginx.list  || InstallationFailed
}

function InstallWebService {
    #source /usr/share/fastpanel2/bin/install-web.sh
    #InstallWebService
    InstallNginxRepository
    Message "Installing web service: nginx, apache, php.\n"
    UpdateSoftwareList || InstallationFailed
    apt-get install -y apache2 libapache2-mpm-itk libapache2-mod-php7.4 libapache2-mod-fcgid libapache2-mod-rpaf apache2-suexec-custom || InstallationFailed
    /etc/init.d/apache2 stop
    a2dismod status
    apt-get install -y nginx php-common php7.4 php7.4-cgi php7.4-fpm php7.4-cli || InstallationFailed

    /usr/local/fastpanel2/fastpanel services configure -f -p nginx
    /usr/local/fastpanel2/fastpanel services handle --name=nginx --action=enable
    /usr/local/fastpanel2/fastpanel services handle --name=nginx --action=restart

    /usr/local/fastpanel2/fastpanel services configure -f -p apache2
    /usr/local/fastpanel2/fastpanel services handle --name=apache2 --action=enable
    /usr/local/fastpanel2/fastpanel services handle --name=apache2 --action=restart

    Success    
}