My Wiki!

apache

Serving directories outside www_root

Problem: want to serve a wiki inside home directory:

  wiki -> /home/dang/data/mydirectory/www_local/tdwiki/www/dokuwiki-2012-09-10
  1. create symlink to the directory in “home”.
  2. set Directory access option for this symlink in httpd.conf

    1. Create symlink inside wwwroot cd /var/www/html ln -s /home/dang/data/mydirectory/wwwlocal/tdwiki/www/dokuwiki-2012-09-10 wiki


2. Allow apache access permission

  chown -R apache:apache /home/dang/data/mydirectory/www_local

3. Set x-permission for all dirs on the path.

  chmod +x /home/dang
  chmod +x /home/dang/data
  chmod +x /home/dang/data/mydirectory    
  chmod +x /home/dang/data/mydirectory/www_local
 

/etc/httpd/conf.d/www_local.conf

<Directory "/var/www/html/wiki">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

Alias to a directory outside www_root

Set execute x-permission as about, to all path

/etc/httpd/conf.d/www_local.conf

<IfModule alias_module>
Alias /lweb /home/dang/data/mydirectory/www_local
</IfModule>

<Directory "/home/dang/data/mydirectory/www_local">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>


<Directory "/var/www/html/wiki">
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

Navigation