All Guides
Nginx Webserver Einrichtung
Installieren Sie den Nginx-Webserver und konfigurieren Sie ihn als Reverse Proxy.
Intermediate20 Min.
Setup Steps
1. Install Nginx:
sudo apt update
sudo apt install nginx -y2. Start Nginx:
sudo systemctl start nginx
sudo systemctl enable nginx3. Create a server block:
sudo nano /etc/nginx/sites-available/mysite4. Configuration content:
server {
listen 80;
server_name mysite.com www.mysite.com;
root /var/www/mysite;
index index.html;
location / {
try_files $uri $uri/ =404;
}
}5. Enable the site:
sudo ln -s /etc/nginx/sites-available/mysite /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx6. Reverse proxy for Node.js app:
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}7. Enable gzip compression:
gzip on;
gzip_types text/css application/javascript application/json;Related Guides
Linux VPS Server Einrichtung (Ubuntu)
Konfigurieren Sie Ihren Ubuntu-basierten VPS-Server von Grund auf.
Apache Webserver Einrichtung
Installieren Sie den Apache HTTP-Server und konfigurieren Sie virtuelle Hosts.
Let's Encrypt SSL-Zertifikat
Holen Sie sich ein kostenloses SSL/TLS-Zertifikat mit Certbot.
Node.js und npm Einrichtung
Installieren Sie die Node.js-Laufzeitumgebung und den npm-Paketmanager.