Subject: Style sheets lost while securing directories?
Description: Securing directories, Dokuwiki looks "ugly" - big buttons, no "Media File" buttons in Edit mode
*** Summary: ***
Can secure "data" and "conf" without problems. (Have to create php.ini for "conf" - PHP is CGI not webmodule.)
When attempting to move "lib" and "inc" all goes bad. The symbolic link was created, and files can be listed via the link. The wiki works, but it is ugly, all the style sheets seem to disappear, the edit buttons are replaced with a "Media Files" link that when clicked returns the message "You don't have permission to access /balance/lib/exe/mediamanager.php on this server."
Anybody know the solution or able to suggest "next debugging steps"?
Thanks
*** Details: (ad nauseam) ***
Dokuwiki 2008-05-05
Apache 1.3.37 on Redhat Linux
PHP 5.2.5 setup as CGI Engine (vs Apache Web Module)
On a hosted site so I cannot control the Apache configuration.
- Have access to host provided "file manager" - can ftp files etc.
- Do not have command line access, but with PHP system function, can create links
- Allowed to have subdomains and created a subdomain "expenses"
- This subdomain can be reached via "http://expenses.<domain>.com" which under the covers maps to --> /home/<username>/www/expenses
- Have private directories at /home/<username>/private
- Dokuwiki was extracted to at /home/<username>/www/expenses/dokuwiki-2008-05-05
- Extraction directory was renamed to /home/<username>/www/expenses/balance
- http://expenses.<domain>.com/balance/install.php was run, activated ACLs, set to be a public wiki.
- Successfully installed Dokuwiki per above, runs and all is well
- "All is well" means, can view pages, create pages and page rendering/editing looks "formatted properly" with appropriate template or style sheet (sorry, not a web guy so this is my best guess and I am a out of my element)
- Attempting to secure install directories per
http://wiki.splitbrain.org/wiki:security#securing_the_install_directories
- created /home/<username>/private/wiki/expenses to hold all wiki private directories.
- Can move Data directory out of web root, data directory was copied to /home/<user>/private/wiki/expenses/data, used config manager to set "savedir Directory for saving data" to new location, deleted original data directory. "All stays well"
- Can move Conf directory out of web root, "All stays well" - requires extra steps and a php.ini (GCI engine - versus Apache Web Module, modifying .htaccess file per instructions will not work)
- Additional "move Conf Dir" Note1: created "/home/<user>/private/wiki/expenses/prepend.php" with:
============ begin /home/<user>/private/wiki/expenses/prepend.php ============
<?php
define('DOKU_CONF','/home/<user>/private/wiki/expenses/conf/');
============ end /home/<user>/private/wiki/expenses/prepend.php ============
- Additional "move Conf Dir" Note2: created "/home/<user>/www/expenses/balance/php.ini" (it is in same directory as doku.php which is called with "http://expenses.<domain>.com/balance/doku.php") with:
============ begin /home/<user>/www/expenses/balance/php.ini ============
auto_prepend_file = "/home/<user>/private/wiki/expenses/prepend.php"
register_globals = on
post_max_size = 20M
memory_limit = 80M
upload_max_filesize = 20M
max_execution_time = 120
expose_php = off
session.save_path = /tmp
mysqli.default_socket = /tmp/mysql5.sock
============ end /home/<user>/www/expenses/balance/php.ini ============
- Additional "move Conf Dir" Note3: Added soft link so /home/<user>/private/wiki/conf/php.ini -> /home/<user>/www/expenses/balance/php.ini
When attempting to move "lib" and "inc" all goes bad. The symbolic link was created, and files can be listed. The wiki works, but it is ugly, all the style sheets seem to disappear, the edit buttons are replaced with a "Media Files" link that when clicked returns the message "You don't have permission to access /balance/lib/exe/mediamanager.php on this server."
updated above file to:
============ begin /home/<user>/private/wiki/expenses/prepend.php ============
<?php
define('DOKU_CONF','/home/<user>/private/wiki/expenses/conf/');
define('DOKU_INC','/home/<user>/private/wiki/expenses/');
============ end /home/<user>/private/wiki/expenses/prepend.php ============
added soft link so:
/home/<user>/www/expenses/balance/lib -> /home/<user>/private/wiki/expenses/lib