server { listen 80; server_name _; # Maximum file upload size is 4MB client_max_body_size 4M; client_body_buffer_size 128k; root /var/www/dokuwiki; index index.php; # 安装结束后,启用下面这句配置,防止重新安装。 #location ~ /(data/|conf/|bin/|inc/|install.php) { deny all; } location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ =404; } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { include snippets/fastcgi-php.conf; # With php7.0-cgi alone: #fastcgi_pass 127.0.0.1:9000; # With php7.0-fpm: fastcgi_pass unix:/run/php/php7.0-fpm.sock; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one # location ~ /\.ht { deny all; } }