moinmoin apache2配置

对apache2不熟,折腾了半天,记录一下,主要就是virtualhost那块比较乱

 

Virtual Hosts Settings

Virtual hosts allow you to run different servers for different IP addresses, different host names, or different ports on the same machine. For example, you can run the website for http://www.example.com and http://www.anotherexample.com on the same Web server using virtual hosts. This option corresponds to the <VirtualHost> directive for the default virtual host and IP-based virtual hosts. It corresponds to the <NameVirtualHost> directive for a name-based virtual host.

The directives set for a virtual host only apply to that particular virtual host. If a directive is set server-wide and not defined within the virtual host settings, the default setting is used. For example, you can define a Webmaster email address and not define individual email addresses for each virtual host.

Set the DocumentRoot directive to the directory that contains the root document (such as index.html) for the virtual host. The default DocumentRoot is /var/www.

The ServerAdmin directive within the VirtualHost stanza is email the address used in the footer of error pages if you choose to show a footer with an email address on the error pages.

这一段参考:https://help.ubuntu.com/6.06/ubuntu/serverguide/C/httpd.html

 

 

moinmoin的配置方法在/usr/share/doc/python-moinmoin/README.Debian.gz里面有

ports.conf中新增一个端口

NameVirtualHost *:8000
Listen 8000

sites-available中:新建一个mywiki文件

 

 1  < VirtualHost  *:8000 >
 2      ServerAdmin webmaster@localhost
 3      ServerName localhost
 4      # 用来匹配请求的服务器名
 5      # 比如localhost:8000/MyWiki就会匹配这个配置文件所配置的服务器
 6      
 7      DocumentRoot /var/www/mywiki/
 8      Alias /moin_static185/applets/FCKeditor/ "/usr/share/fckeditor/"
 9      Alias /moin_static185/ "/usr/share/moin/htdocs/"
10      Alias /wiki "/usr/share/moin/htdocs/"
11      ScriptAlias /MyWiki "/var/www/mywiki/moin.cgi"
12 
13      ErrorLog /var/log/apache2/error.log
14 
15      # Possible values include: debug, info, notice, warn, error, crit,
16      # alert, emerg.
17      LogLevel warn
18 
19  </ VirtualHost >
20 

 访问localhost:8000/MyWiki 就可以了

转载于:https://www.cnblogs.com/lbsx/archive/2009/11/15/1603353.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值