Hallo,
habe bisher immer nur owncloud auf einem pi laufen gehabt.
Möchte auf meinen Pi 2 nun owncloud und dokuwiki drauf installieren.
Weis aber nicht genau wie ich nginx konfigurieren soll.
Die Konfiguration von owncloud von hier
Owncloud 5 Server installieren (nginx Webserver)
Code
server {
listen 80;
server_name 192.168.XXX.XXX;
rewrite ^ https://$server_name$request_uri? permanent; # enforce https
}
server {
listen 443 ssl;
server_name 192.168.XXX.XXX;
ssl_certificate /etc/nginx/cert.pem;
ssl_certificate_key /etc/nginx/cert.key;
root /var/www;
index index.php;
client_max_body_size 1000M; # set maximum upload size
fastcgi_buffers 64 4K;
location ~ ^/owncloud/(data|config|\.ht|db_structure\.xml|README) {
deny all;
}
location / {
try_files $uri $uri/ index.php;
}
location @webdav {
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS on;
include fastcgi_params;
}
location ~ ^(?<script_name>.+?\.php)(?<path_info>/.*)?$ {
try_files $script_name = 404;
include fastcgi_params;
fastcgi_param PATH_INFO $path_info;
fastcgi_param HTTPS on;
fastcgi_pass 127.0.0.1:9000;
}
}
Alles anzeigen
dokuwiki gibt an man soll dies einfügen
https://www.dokuwiki.org/install:nginx
Code
server {
listen 80;
listen [::]:80;
server_name wiki.boetes.org;
location / {
return 301 https://wiki.boetes.org$request_uri;
}
}
server {
listen [::]:443 ssl;
listen 443 ssl;
server_name wiki.boetes.org;
# Maximum file upload size is 4MB - change accordingly if needed
client_max_body_size 4M;
client_body_buffer_size 128k;
root /dokuwiki;
index doku.php;
location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; }
location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
expires 31536000s;
add_header Pragma "public";
add_header Cache-Control "max-age=31536000, public, must-revalidate, proxy-revalidate";
log_not_found off;
}
location / { try_files $uri $uri/ @dokuwiki; }
location @dokuwiki {
rewrite ^/_media/(.*) /lib/exe/fetch.php?media=$1 last;
rewrite ^/_detail/(.*) /lib/exe/detail.php?media=$1 last;
rewrite ^/_export/([^/]+)/(.*) /doku.php?do=export_$1&id=$2 last;
rewrite ^/(.*) /doku.php?id=$1&$args last;
}
location ~ \.php$ {
try_files $uri $uri/ /doku.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REDIRECT_STATUS 200;
fastcgi_pass unix:/php-fpm/socket;
}
}
Alles anzeigen
Wie soll ich diese beiden sachen nun vereinen? Einfach das ganze ab location noch unten einfügen wird ja wohl nicht gehen oder doch?
Danke für die Hilfe
Lord-of-Chaos