apt-get update && apt-get upgrade apt-get install libpcre3 libpcre3-dev libssl-dev openssl zlib1g-dev apt-get install build-essential apt-get install unzip OPTIONAL apt-get install nano htop apt-get install unzip wget http://nginx.org/download/nginx-1.21.0.tar.gz //wget https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/archive/dev.zip wget https://github.com/winshining/nginx-http-flv-module/archive/v1.2.9.zip wget https://github.com/aperezdc/ngx-fancyindex/archive/v0.5.1.zip tar -zxvf nginx-1.21.0.tar.gz //unzip dev.zip unzip v1.2.9.zip unzip v0.5.1.zip cd nginx-1.21.0 ./configure --sbin-path=/usr/sbin --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --pid-path=/var/run/nginx.pid --lock-path=/var/lock/nginx.lock --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/body --http-proxy-temp-path=/var/lib/nginx/proxy --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --with-http_addition_module --with-http_stub_status_module --with-http_flv_module --with-http_mp4_module --with-http_ssl_module --with-http_sub_module --with-http_dav_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_realip_module --with-mail --with-mail_ssl_module --with-http_v2_module --with-file-aio --with-debug --add-module=../nginx-http-flv-module-1.2.9 --add-module=../ngx-fancyindex-0.5.1 make make install systemctl stop apache2 systemctl disable apache2 systemctl enable nginx nano /etc/init.d/nginx FILE-CONTENT: #! /bin/sh ### BEGIN INIT INFO # Provides: nginx # Required-Start: $local_fs $remote_fs $network $syslog # Required-Stop: $local_fs $remote_fs $network $syslog # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: starts the nginx web server # Description: starts nginx using start-stop-daemon ### END INIT INFO PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/nginx NAME=nginx DESC=nginx test -x $DAEMON || exit 0 # Include nginx defaults if available if [ -f /etc/default/nginx ] ; then . /etc/default/nginx fi set -e . /lib/lsb/init-functions test_nginx_config() { if nginx -t $DAEMON_OPTS then return 0 else return $? fi } case "$1" in start) echo -n "Starting $DESC: " test_nginx_config start-stop-daemon --start --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON -- $DAEMON_OPTS || true echo "$NAME." ;; stop) echo -n "Stopping $DESC: " start-stop-daemon --stop --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON || true echo "$NAME." ;; restart|force-reload) echo -n "Restarting $DESC: " start-stop-daemon --stop --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON || true sleep 1 test_nginx_config start-stop-daemon --start --quiet --pidfile \ /var/run/$NAME.pid --exec $DAEMON -- $DAEMON_OPTS || true echo "$NAME." ;; reload) echo -n "Reloading $DESC configuration: " test_nginx_config start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/$NAME.pid \ --exec $DAEMON || true echo "$NAME." ;; configtest) echo -n "Testing $DESC configuration: " if test_nginx_config then echo "$NAME." else exit $? fi ;; status) status_of_proc -p /var/run/$NAME.pid "$DAEMON" nginx && exit 0 || exit $? ;; *) echo "Usage: $NAME {start|stop|restart|reload|force-reload|status|configtest}" >&2 exit 1 ;; esac exit 0 FILE-END! chmod +x /etc/init.d/nginx mkdir /var/lib/nginx/ mkdir /var/lib/nginx/body REBOOT /etc/init.d/nginx start update-rc.d nginx defaults OPTIONAL: apt-get install software-properties-common python-software-properties add-apt-repository ppa:ondrej/php apt-get update apt-get install php7.4-fpm php7.4-curl php-pear php7.4-gd php7.4-mbstring php7.4-mysql php7.4-xml php7.4-soap dbconfig-common wwwconfig-common nano /etc/php/7.4/fpm/pool.d/www.conf FIND-AND-REPLACE: "listen = /run/php*-fpm.sock" ersetzen mit "listen = 127.0.0.1:9000" nano /etc/php/7.4/fpm/php.ini FIND-AND-REPLACE: upload_max_filesize = XXX post_max_size = XXX OPTIONAL: chmod go+rw /var/run/php/php7.4-fpm.sock service php7.4-fpm restart OPTIONAL: add to nginx.conf or /sites-available/your.conf FILE-ADD: auth_basic "Restricted"; # Ausgabemeldung bei Zugriff auth_basic_user_file /etc/nginx/.htpasswd; # Pfad zur PW Datei FILE-END PW-DATEO UND NUTZER ERSTELLEN htpasswd -c /etc/nginx/.htpasswd YOUR-USER WEITERER NUTZER htpasswd /etc/nginx/.htpasswd another_user