2. Configuration

2.1. Apache Configuration

2.1.1. Automatic

  • The setup.php script will automatically create both config.inc.php and .htaccess files

2.1.2. Manual

  • Copy the configuration sample file cp config.sample.inc.php config.inc.php
  • Edit the configuration file nano config.inc.php
  • Create the .htaccess file like this:
    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteBase /
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^(.*)$ index.php?doc=$1 [NC,L,QSA]
    </IfModule>
  • Make sure that RewriteBase is the same as the PATH in the configuration file included trailing slashes

2.2. Nginx Configuration

2.2.1 Manual

  • Use this as Nginx configuration for WikiDocs:
    ...
    location /wikidocs/ {
      if (!-e $request_filename){
          rewrite ^/(.*)$ /index.php?doc=$1 last;
      }
      try_files $uri $uri/ =404;
    }
  • Copy the configuration sample file cp datasets/config.sample.inc.php datasets/config.inc.php
  • Edit the configuration file nano datasets/config.inc.php

This page was last edited on 2023-05-16 08:39

Powered by Wiki|Docs

This page was last edited on 2023-05-16 08:39

Manuel Zavatta | WikiDocs.it
Copyright © All rights reserved

Powered by Wiki|Docs