Linux.nginx: Unterschied zwischen den Versionen

Aus OrgaMon Wiki
Zur Navigation springen Zur Suche springen
Zeile 7: Zeile 7:
  apt-get install nginx
  apt-get install nginx
  apt-get install php php-fpm
  apt-get install php php-fpm
* orgamon-2.dyndns.org
server {
        listen 80 default_server;
        listen [::]:80 default_server;
        root /srv/ngx/orgamon-2.dyndns.org;
        index index.html index.htm index.nginx-debian.html;
        server_name orgamon-2.dyndns.org;
        location / {
                # First attempt to serve request as file, then
                # as directory, then fall back to displaying a 404.
                try_files $uri $uri/ =404;
        }
        location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
        }
}


== Stufe 2, :443 HTTPS-Server ==
== Stufe 2, :443 HTTPS-Server ==

Version vom 27. August 2018, 17:25 Uhr

Überblick

  • Ich verwendet nginx als HTTP/2 Server auf einem Raspberry Pi

Stufe 1, :80 HTTP-Server

apt-get install nginx
apt-get install php php-fpm
  • orgamon-2.dyndns.org
server {
       listen 80 default_server;
       listen [::]:80 default_server;

       root /srv/ngx/orgamon-2.dyndns.org;

       index index.html index.htm index.nginx-debian.html;

       server_name orgamon-2.dyndns.org;

       location / {
               # First attempt to serve request as file, then
               # as directory, then fall back to displaying a 404.
               try_files $uri $uri/ =404;
       }

       location ~ \.php$ {
               include snippets/fastcgi-php.conf;
               fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
       }

}

Stufe 2, :443 HTTPS-Server

Stufe 3, :443 HTTP/2 Server mit TLS 1.2

Stufe 4, :443 HTTP/2 Server mit TLS 1.3 (only!)