Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
| Beide Seiten der vorigen RevisionVorhergehende Überarbeitung | |||
| dokuwiki_in_nginx [2025/09/14 20:14] – ranslite | dokuwiki_in_nginx [2025/09/14 20:17] (aktuell) – ranslite | ||
|---|---|---|---|
| Zeile 137: | Zeile 137: | ||
| <code bash> | <code bash> | ||
| sudo nano / | sudo nano / | ||
| + | </ | ||
| + | <code nginx> | ||
| + | |||
| + | location / { | ||
| + | try_files $uri $uri/ @dokuwiki; | ||
| + | } | ||
| + | |||
| + | location @dokuwiki { | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/ | ||
| + | rewrite ^/(.*) / | ||
| + | } | ||
| + | |||
| + | location ~ \.php$ { | ||
| + | include snippets/ | ||
| + | fastcgi_pass unix:/ | ||
| + | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | ||
| + | include fastcgi_params; | ||
| + | } | ||
| + | |||
| + | # Verweigert Zugriff auf die Ordner data, conf, bin, inc, vendor | ||
| + | location ^~ /data/ { | ||
| + | return 404; | ||
| + | } | ||
| + | |||
| + | location ^~ /conf/ { | ||
| + | return 404; | ||
| + | } | ||
| + | |||
| + | location ^~ /bin/ { | ||
| + | return 404; | ||
| + | } | ||
| + | |||
| + | location ^~ /inc/ { | ||
| + | return 404; | ||
| + | } | ||
| + | |||
| + | location ^~ /vendor/ { | ||
| + | return 404; | ||
| + | } | ||
| + | |||
| </ | </ | ||