====== 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 ==== Symlink from www_root ==== - create symlink to the directory in "home". - set Directory access option for this symlink in httpd.conf 1. Create symlink inside www_root cd /var/www/html ln -s /home/dang/data/mydirectory/www_local/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 === Options Indexes FollowSymLinks AllowOverride None Require all granted ==== Alias to a directory outside www_root ==== ** Set execute x-permission as about, to all path ** === /etc/httpd/conf.d/www_local.conf === Alias /lweb /home/dang/data/mydirectory/www_local Options Indexes FollowSymLinks AllowOverride None Require all granted Options Indexes FollowSymLinks AllowOverride None Require all granted