【发布时间】:2014-05-10 02:26:05
【问题描述】:
请您帮忙看看我的配置 Apache + Web.py + Mod_WSGI 有什么问题,我的网站无法加载,这是我的配置:
Apache 版本:2.7.4
Web.py 版本 -> https://github.com/webpy/webpy
mod_wsgi -> 不确定是 3.3 还是 3.4
目录 /var/www/pyapps/bot
web -> 链接 webpy 网页版 代码.py 静止的 模板
阿帕奇 ServerAdmin webmaster@localhost
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>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
CustomLog ${APACHE_LOG_DIR}/access.log combine
WSGIScriptAlias /sitea /var/www/pyapps/bot/code.py/
Alias /sitea/static /var/www/pyapps/bot/static
Alias /sitea/templates /var/www/pyapps/bot/templates
AddType text/html .py
<Directory /var/www/pyapps/bot>
Order deny,allow
Allow from All
</Directory>
<Directory /sitea/static>
Options +Indexes
</Directory>
代码.py
导入网页
网址 = ( '/。*', '你好', )
类你好: 定义获取(自我): 返回“你好,世界。”
application = web.application(urls, globals()).wsgifunc()
结果
找不到
在此服务器上找不到请求的 URL /sitea。
Apache/2.2.22 (Ubuntu) 服务器在 xxx.xxx.xxx.xxx 端口 80
【问题讨论】: