|
|
| Zeile 1: |
Zeile 1: |
| == nginx auf Ubuntu installieren == | | == Frontend Frameworks – Reifegrade == |
|
| |
|
| === Voraussetzungen ===
| | ; Tier-Definition (Kurzfassung) |
| * Ubuntu Server (18.04 LTS oder neuer)
| | * Tier 1: Weit verbreitet, stabil, Langzeitpflege, starkes Ökosystem |
| * Root- oder sudo-Berechtigungen | |
|
| |
|
| === Installation ===
| |
|
| |
|
| ==== Paketlisten aktualisieren ====
| | {| class="wikitable sortable" |
| <source lang="bash">
| | ! Tier !! Framework !! Kategorie !! Erstveröffentlichung !! Governance/Backing !! Release-/LTS-Kadenz !! Kurzbewertung |
| sudo apt update
| | |- |
| </source>
| | | 1 || React || Bibliothek || 2013 || Meta + Community || regelmäßig || Dominantes Ökosystem, sehr stabil |
| | |- |
| | | 1 || Angular || Framework || 2016 || Google || LTS || Enterprise‑fokussiert, integrierter Stack |
| | |- |
| | | 1 || Vue.js || Framework || 2014 || Core‑Team + Community || regelmäßig || Reif, breite Adoption |
| | |- |
| | | 1 || Next.js || Meta‑Framework (React) || 2016 || Vercel || schnell || Produktionsreif, SSR/ISR/RSC |
|
| |
|
| ==== nginx installieren ====
| | |} |
| <source lang="bash">
| |
| sudo apt install nginx
| |
| sudo rm /etc/nginx/sites-enabled/default
| |
| </source>
| |
| | |
| ==== Status prüfen ====
| |
| <source lang="bash">
| |
| sudo systemctl status nginx
| |
| </source>
| |
| | |
| === Firewall konfigurieren ===
| |
| <source lang="bash">
| |
| sudo ufw allow 'Nginx Full'
| |
| sudo ufw status
| |
| </source>
| |
| | |
| === Grundlegende Befehle ===
| |
| <source lang="bash">
| |
| # nginx starten
| |
| sudo systemctl start nginx
| |
| | |
| # nginx stoppen
| |
| sudo systemctl stop nginx
| |
| | |
| # nginx neustarten
| |
| sudo systemctl restart nginx
| |
| | |
| # Konfiguration neu laden
| |
| sudo systemctl reload nginx
| |
| | |
| # Autostart aktivieren
| |
| sudo systemctl enable nginx
| |
| </source>
| |
| | |
| === Wichtige Verzeichnisse ===
| |
| * Konfiguration: <code>/etc/nginx/</code>
| |
| * Webroot: <code>/var/www/html/</code>
| |
| * Logs: <code>/var/log/nginx/</code>
| |
| | |
| == Drupal mit PostgreSQL ==
| |
| | |
| === Datenbank anlegen ===
| |
| <source lang="bash">
| |
| sudo -u postgres -i
| |
| createdb -E UTF8 -O thorsten drupal
| |
| exit # Ausloggen
| |
| </source>
| |
| ==PHP Installieren==
| |
| <pre>
| |
| sudo apt install php-fpm php-pgsql php-xml php-curl php-gd php-mbstring php-xmlrpc php-zip php-intl php-json php-cli php-common php-apcu php-bcmath php-soap php-ldap php-imagick php-zip php-gmp -y
| |
| </pre>
| |
| ==Composer Installieren==
| |
| <pre>
| |
| | |
| php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
| |
| php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }"
| |
| php composer-setup.php
| |
| php -r "unlink('composer-setup.php');"
| |
| sudo mv composer.phar /usr/local/bin/composer
| |
| | |
| </pre>
| |
| | |
| == Drupal Installieren==
| |
| <pre>
| |
| cd /var/www
| |
| sudo composer create-project drupal/recommended-project drupal
| |
| | |
| </pre>
| |
| | |
| == Nginx Konfigurationsdatei erstellen ==
| |
| | |
| Erstelle eine neue Konfigurationsdatei mit folgendem Befehl:
| |
| <source lang="bash">
| |
| sudo nano /etc/nginx/conf.d/start.conf
| |
| </source>
| |
| | |
| Füge zum Beispiel folgende Grundkonfiguration ein:
| |
| <pre>
| |
| server {
| |
| listen 80;
| |
| server_name localhost;
| |
| root /var/www/drupal/web;
| |
| | |
| index index.php index.html index.htm;
| |
| | |
| | |
| | |
| # Sicherheitsheader
| |
| add_header X-Frame-Options "SAMEORIGIN";
| |
| add_header X-Content-Type-Options "nosniff";
| |
| add_header X-XSS-Protection "1; mode=block";
| |
| | |
| # Gzip-Komprimierung
| |
| gzip on;
| |
| gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;
| |
| | |
| location = /favicon.ico { log_not_found off; access_log off; }
| |
| location = /robots.txt { allow all; log_not_found off; access_log off; }
| |
| | |
| location ~ \..*/.*\.php$ { return 403; }
| |
| location ~ ^/sites/.*/private/ { return 403; }
| |
| location ~ ^/sites/[^/]+/files/.*\.php$ { deny all; }
| |
| location ~ (^|/)\. { return 403; }
| |
| | |
| location / {
| |
| try_files $uri /index.php?$query_string;
| |
| }
| |
| | |
| location @rewrite {
| |
| rewrite ^/(.*)$ /index.php?q=$1;
| |
| }
| |
| | |
| location ~ /vendor/.*\.php$ {
| |
| deny all;
| |
| return 404;
| |
| }
| |
| | |
| location ~ '\.php$|^/update.php' {
| |
| include fastcgi_params;
| |
| fastcgi_split_path_info ^(.+?\.php)(/.*)?$;
| |
| fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
| |
| fastcgi_param PATH_INFO $fastcgi_path_info;
| |
| fastcgi_param HTTP_PROXY "";
| |
| fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
| |
| fastcgi_intercept_errors on;
| |
| }
| |
| | |
| location ~ ^/sites/.*/files/styles/ {
| |
| try_files $uri @rewrite;
| |
| }
| |
| | |
| location ~ ^(/[a-z\-]+)?/system/files/ {
| |
| try_files $uri /index.php?$query_string;
| |
| }
| |
| | |
| location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
| |
| try_files $uri @rewrite;
| |
| expires max;
| |
| log_not_found off;
| |
| }
| |
| } | |
| </pre>
| |
| | |
| Speichere die Datei und lade die Nginx-Konfiguration neu:
| |
| <source lang="bash">
| |
| sudo systemctl reload nginx
| |
| </source>
| |
Frontend Frameworks – Reifegrade
- Tier-Definition (Kurzfassung)
- Tier 1: Weit verbreitet, stabil, Langzeitpflege, starkes Ökosystem
| Tier |
Framework |
Kategorie |
Erstveröffentlichung |
Governance/Backing |
Release-/LTS-Kadenz |
Kurzbewertung
|
| 1 |
React |
Bibliothek |
2013 |
Meta + Community |
regelmäßig |
Dominantes Ökosystem, sehr stabil
|
| 1 |
Angular |
Framework |
2016 |
Google |
LTS |
Enterprise‑fokussiert, integrierter Stack
|
| 1 |
Vue.js |
Framework |
2014 |
Core‑Team + Community |
regelmäßig |
Reif, breite Adoption
|
| 1 |
Next.js |
Meta‑Framework (React) |
2016 |
Vercel |
schnell |
Produktionsreif, SSR/ISR/RSC
|