0

我最近通过编辑我的 httpd.conf 文件向 Django 站点添加了一个 favicon:

别名 /favicon.ico /home/learntango/webapps/staticapp/site_images/favicon.ico

这适用于无 www,但不适用于 www。:

有什么建议吗?

谢谢!
大卫


完整的 httpd.conf 文件供参考:

ServerRoot "/home/learntango/webapps/django/apache2"

LoadModule dir_module        modules/mod_dir.so
LoadModule env_module        modules/mod_env.so
LoadModule log_config_module modules/mod_log_config.so
LoadModule mime_module       modules/mod_mime.so
LoadModule rewrite_module    modules/mod_rewrite.so
LoadModule setenvif_module   modules/mod_setenvif.so
LoadModule wsgi_module       modules/mod_wsgi.so
LoadModule alias_module      modules/mod_alias.so

Alias /favicon.ico /home/learntango/webapps/staticapp/site_images/favicon.ico

LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
CustomLog /home/learntango/logs/user/access_django.log combined
ErrorLog /home/learntango/logs/user/error_django.log
KeepAlive Off
Listen 32691
MaxSpareThreads 3
MinSpareThreads 1
ServerLimit 1
SetEnvIf X-Forwarded-SSL on HTTPS=1
ThreadsPerChild 5
WSGIDaemonProcess django processes=2 threads=12 python-path=/home/learntango/webapps/django:/home/learn
tango/webapps/django/lib/python2.7
WSGIProcessGroup django
WSGIRestrictEmbedded On
WSGILazyInitialization On
WSGIScriptAlias / /home/learntango/webapps/django/mysite.wsgi
4

2 回答 2

1

它对我有用。你清除浏览器缓存了吗?

于 2012-08-04T22:20:19.750 回答
0

解决了,虽然我不知道为什么它没有早点工作!

于 2012-08-06T14:58:19.127 回答