Skip to content

NGINX - Grundlagen worker_processes

NGINX
  • Beim Schauen diesen Videos bin ich über was gestolpert, was ich mal testen muss 😉

    Es geht um die NGINX Config, die man unter /etc/nginx/nginx.conf findet. Ein Ausschnitt.

    user  nginx;
    worker_processes  1;
    
    error_log  /var/log/nginx/error.log warn;
    pid        /var/run/nginx.pid;
    

    Im Video wird erklärt, das man das auf auto setzen soll.

    user  nginx;
    worker_processes  auto;
    
    error_log  /var/log/nginx/error.log warn;
    pid        /var/run/nginx.pid;
    

    Was macht das?

    vorher

    root@webserver2:~# ps -ef | grep nginx
    root       503     1  0 Sep19 ?        00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
    nginx      940   503  0 Sep19 ?        00:06:10 nginx: worker process
    root     24535 24238  0 17:41 pts/1    00:00:00 grep nginx
    

    nachher

    root@webserver2:/etc/nginx# ps -ef | grep nginx
    root       503     1  0 Sep19 ?        00:00:00 nginx: master process /usr/sbin/nginx -c /etc/nginx/nginx.conf
    nginx      940   503  0 Sep19 ?        00:06:10 nginx: worker process is shutting down
    nginx    25185   503  0 17:42 ?        00:00:00 nginx: worker process
    nginx    25186   503  0 17:42 ?        00:00:00 nginx: worker process
    nginx    25187   503  0 17:42 ?        00:00:00 nginx: worker process
    nginx    25188   503  0 17:42 ?        00:00:00 nginx: worker process
    root     29512 24238  0 17:51 pts/1    00:00:00 grep nginx
    

    Ok, vorher hatte ich einen Prozess, nun habe ich vier Prozesse. Ich bilde mir ein, das das Forum jetzt deutlich schneller geworden ist 😉

    Das Ganze mal beobachten.

  • Debian 11 - nginx mit Seafile

    NGINX nginx
    3
    0 Stimmen
    3 Beiträge
    222 Aufrufe
    H
    Hi, ja es ist zu Warm Hab mich vielleicht etwas falsch ausgedrückt. Ich suche ne möglichkeit bzw. ein Howto wie ich Seafile für einen bekannten auf ein Shared Hosting Paket installiert bekomme.
  • NGINX - Neue Domain bekannt machen

    NGINX nginx
    1
    0 Stimmen
    1 Beiträge
    131 Aufrufe
    Niemand hat geantwortet
  • NGINX - SSL routines:ssl3_read_bytes:tlsv1 alert protocol version

    NGINX
    1
    0 Stimmen
    1 Beiträge
    406 Aufrufe
    Niemand hat geantwortet
  • NGINX - Installation

    NGINX nginx linux
    1
    2
    0 Stimmen
    1 Beiträge
    351 Aufrufe
    Niemand hat geantwortet
  • NGINX - Standard .conf

    NGINX nginx
    3
    0 Stimmen
    3 Beiträge
    418 Aufrufe
    FrankMF
    Als kleiner Tipp, die meisten Anbieter von Software haben mittlerweile Beispiele, wie man das konfiguriert. Hier mal ein Beispiel von Nextcloud. https://docs.nextcloud.com/server/16/admin_manual/installation/nginx.html
  • NodeBB & ads.txt

    Verschoben NGINX nginx
    1
    0 Stimmen
    1 Beiträge
    242 Aufrufe
    Niemand hat geantwortet
  • NGINX - www entfernen

    NGINX nginx
    2
    0 Stimmen
    2 Beiträge
    365 Aufrufe
    FrankMF
    Es geht noch eleganter. Für eine Domain wie frank-mankel.de z.B. so. Muss das mal hier parken, damit ich nicht immer wieder danach suchen muss. server { server_name www.example.com example.com; return 301 https://example.com$request_uri; } server { listen 443 ssl; ssl_certificate /path/to/server.cert; ssl_certificate_key /path/to/server.key; server_name www.example.com; return 301 https://example.com$request_uri; } server { listen 443 ssl; ssl_certificate /path/to/server.cert; ssl_certificate_key /path/to/server.key; server_name example.com; <locations for processing requests> } Quelle: https://serverfault.com/questions/258378/remove-www-and-redirect-to-https-with-nginx
  • NGINX

    Verschoben NGINX nginx linux
    1
    0 Stimmen
    1 Beiträge
    582 Aufrufe
    Niemand hat geantwortet