Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen Revision Vorhergehende Überarbeitung Nächste Überarbeitung | Vorhergehende Überarbeitung | ||
nginx [2025/06/17 03:29] admin |
nginx [2025/06/22 00:58] (aktuell) jango [HTTP] |
||
---|---|---|---|
Zeile 30: | Zeile 30: | ||
http { | http { | ||
server { | server { | ||
- | listen | + | listen |
location / { | location / { | ||
root html; | root html; | ||
Zeile 70: | Zeile 70: | ||
listen 443 ssl; | listen 443 ssl; | ||
server_name example.com www.example.com; | server_name example.com www.example.com; | ||
+ | root / | ||
+ | index index.html; | ||
+ | | ||
ssl_certificate / | ssl_certificate / | ||
ssl_certificate_key / | ssl_certificate_key / | ||
Zeile 77: | Zeile 79: | ||
ssl_protocols TLSv1.2 TLSv1.3; | ssl_protocols TLSv1.2 TLSv1.3; | ||
ssl_ciphers HIGH: | ssl_ciphers HIGH: | ||
- | |||
- | root / | ||
- | index index.html; | ||
location / { | location / { | ||
Zeile 87: | Zeile 86: | ||
</ | </ | ||
+ | =====PHP===== | ||
+ | |||
+ | [[coding: | ||
+ | < | ||
+ | server { | ||
+ | location ~ \.php$ { | ||
+ | include snippets/ | ||
+ | fastcgi_pass unix:/ | ||
+ | } | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | Prevent download of .htaccess files | ||
+ | |||
+ | < | ||
+ | server { | ||
+ | location ~ /\.ht { | ||
+ | deny all; | ||
+ | } | ||
+ | } | ||
+ | </ | ||
=====Proxy===== | =====Proxy===== | ||