Outils pour utilisateurs

Outils du site


article:dokuwiki:installation_dokuwiki_sur_un_serveur_nginx

Ceci est une ancienne révision du document !


Accueil Dokuwiki

cat /etc/nginx/nginx.conf
  • #user http;
    worker_processes  1;
     
    #error_log  logs/error.log;
    #error_log  logs/error.log  notice;
    #error_log  logs/error.log  info;
     
    #pid        logs/nginx.pid;
     
     
    events {
        worker_connections  1024;
    }
     
     
    http {
            server_names_hash_bucket_size 64;
            include sites-enabled/*;
    }                            
cat /etc/nginx/sites-enabled/bzhmd.local.conf                                                                                                                                                      ✔ 
  • server {
      server_name bzhmd.local;
      root /var/www/http/bzhmd.local;
     
      location / {
        index doku.php;
        try_files $uri $uri/ @bzhmd;
      }
     
      location ~ ^/lib.*\.(gif|png|ico|jpg)$ {
        expires 30d;
      }
     
      location ^~ /conf/ { return 403; }
      location ^~ /data/ { return 403; }
     
      location @bzhmd {
        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 ^/(.*) /bzhmd/doku.php?id=$1 last;
      }
     
      location ~ \.php$ {
        fastcgi_split_path_info ^(.+\.php)(/.+)$;
        fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
        fastcgi_index index.php;
        include fastcgi_params;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        fastcgi_intercept_errors off;
        fastcgi_buffer_size 16k;
        fastcgi_buffers 4 16k;
      }
    }
article/dokuwiki/installation_dokuwiki_sur_un_serveur_nginx.1772626036.txt.gz · Dernière modification : de estro

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki