我正在尝试建立一个基本的虚拟主机,以将所有test.local的请求代理到我在127.0.0.1:8080上运行的WEBrick服务器上,同时将对localhost的所有请求都保留到/ var / www中的静态文件中。我正在运行Ubuntu 10.04。
我安装了libapache2-mod-proxy-html,并且已使用a2enmod代理启用了该模块。我还启用了虚拟主机。但是,每当我去test.local时,总会收到一个神秘的500服务器错误,并且我的所有日志都告诉我:
[Thu Mar 03 01:43:10 2011] [warn] proxy: No protocol handler was valid for the URL /. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.
这是我的虚拟主机:
<VirtualHost test.local:80>
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
ServerAdmin webmaster@localhost
ServerName test.local
ProxyPreserveHost On
# prevents this folder from being proxied
ProxyPass /static !
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
ErrorLog /var/log/apache2/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/access.log combined
这是我对mod_proxy的设置:
<IfModule mod_proxy.c>
#turning ProxyRequests on and allowing proxying from all may allow
#spammers to use your proxy to send email.
ProxyRequests Off
<Proxy *>
# default settings
#AddDefaultCharset off
#Order deny,allow
#Deny from all
##Allow from .example.com
AddDefaultCharset off
Order allow,deny
Allow from all
</Proxy>
# Enable/disable the handling of HTTP/1.1 "Via:" headers.
# ("Full" adds the server version; "Block" removes all outgoing Via: headers)
# Set to one of: Off | On | Full | Block
ProxyVia On
</IfModule>
有人知道我在做什么错吗?谢谢