【发布时间】:2015-10-22 21:06:51
【问题描述】:
在我的服务器上,我想通过以下方式重定向通过端口 80 访问的所有流量:
http://12.34.56.78/blahblah/...
到 Python 网络服务器,例如监听端口 7777...
... 其余的 http://12.34.56.78/(anythingelse)/... 到 /home/www/ 使用 Apache。
访问http://12.34.56.78/blahblah/时,我得到:
内部服务器错误
服务器遇到内部错误或配置错误,并且 无法完成您的请求。
为什么它不适用于以下 Apache 配置?
<VirtualHost *:80>
ServerName 12.34.56.78
DocumentRoot /home/www/
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:80>
ServerName 12.34.56.78
<Directory /blahblah/>
RewriteEngine On
RewriteRule /(.*) localhost:7777/$1 [P,L]
</Directory>
</VirtualHost>
【问题讨论】:
标签: python apache .htaccess virtualhost httpd.conf