一、先学习apache2的安装和配置;
二、安装和配置Twiki
安装环境:虚拟机ubuntu 10.04 (Linux ubuntu 2.6.32-25-generic #45-Ubuntu SMP i686 GNU/Linux)
1. 把twiki作为apache2的默认配置,将twiki解压后放在/var/www/下,创建并修改相关文件(在twiki下都有副本,可以直接拷贝,稍加改动即可用),需要修改的文件:
bin/LocalLib.cfg (bin/)
$twikiLibPath = "/var/www/twiki/lib";
lib/LocalSite.cfg (lib/)
# URL for TWiki :123 $cfg{DefaultUrlHost} = ''; # cgi-bin URL path for /twiki/bin $cfg{ScriptUrlPath} = '/twiki/bin'; # Attachments URL /twiki/pub $cfg{PubUrlPath} = '/twiki/pub'; # Attachments store file path (not URL), must match /twiki/ # /usr/local/twiki/pub $cfg{PubDir} = '/var/www/twiki/pub'; # SECURITY NOTE: Directories =twiki/data= , =twiki/templates= and all their # subdirectories should be set so that they are _not_ visible through # URLs. (Alternatively, move the directories to a place where they are # not visible, and set the paths here as appropriate) # Template /usr/local/twiki/templates $cfg{TemplateDir} = '/var/www/twiki/templates'; # Topic files store (file path not URL) e.g. /usr/local/twiki/data # TWiki will use this path to base other defaults, such as the location # of password files. $cfg{DataDir} = '/var/www/twiki/data';
# f file for TWiki. # # You are recommended to take a copy of this file and edit # the paths to match your installation. Then add: # include "/home/httpd/twiki/f" # to the end of your f file. # # The first parameter will be part of the URL to your # /... # The second parameter must point to the physical path on your disk. Be # careful not to lose any trailing /'s. #### Change the _second_ path to match your local installation ScriptAlias /twiki/bin/ "/var/www/twiki/bin/" # This defines a url that points to the root of the twiki installation. It is # used to access files in the pub directory (attachments etc) # It must come _after_ the ScriptAlias. #### Change the path to match your local installation Alias /twiki/ "/var/www/twiki/" # This specifies the options on the TWiki scripts directory. The ExecCGI # and SetHandler tell apache that it contains scripts. "Allow from all" # lets any IP address access this URL. ### Change the path to match your local installation <Directory "/var/www/twiki/bin"> Options +ExecCGI FollowSymLinks SetHandler cgi-script Allow from all </Directory> #<Directory "/var/www/twiki/bin"> # AllowOverride None # Options None # Order allow,deny # Allow from all #</Directory> # # This sets the options on the pub directory, which contains attachments and # other files like CSS stylesheets and icons. AllowOverride None stops a # user installing a .htaccess file that overrides these options. # Note that files in pub are *not* protected by TWiki Access Controls, # so if you want to control access to files attached to topics, you may # need to add your own .htaccess files to subdirectories of pub. See the # Apache documentation on .htaccess for more info. #### Change the path to match your local installation <Directory "/var/www/twiki/pub"> Options FollowSymLinks +Includes Allowoverride All Allow from all </Directory> # Security note: All other directories should be set so # that they are *not* visible as URLs, so we set them as =deny from all=. #### Change the paths to match your local installation <Directory "/var/www/twiki/data"> deny from all </Directory> <Directory "/var/www/twiki/templates"> deny from all </Directory> <Directory "/var/www/twiki/lib"> deny from all </Directory>
index.html (修改index文件中的超链接是为了与f中的ScriptAlias /twiki/bin/ "/var/www/twiki/bin/"保持一致)
<li> <a href="twiki/bin/configure" mce_href="twiki/bin/configure">Configure TWiki</a>
2. 在浏览器中输入localhost/,可以浏览twiki的首页,点击Configure TWiki,进入配置界面
三、配置当中遇到的问题
在f中,
ScriptAlias /twiki/bin/ "/var/www/twiki/bin/"
/twiki/bin是相对于/localhost/来讲的
也就是说在不修改上述index.html的情况下,需要输入localhost/twiki/bin/configure 才可以执行配置
参考资料:.2new/index.html
posted on 2010-11-09 10:39 SunBo 阅读( ...) 评论( ...) 编辑 收藏转载于:.html
本文发布于:2024-02-01 13:38:56,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170676593836992.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |