0

error:File does not exist: /home/WorkSpace/fenxiang/site_media/media/photos/3.jpg the real address 3.jpg is at /home/WorkSpace/fenxiang/askbot/upfiles/photos/3.jpg

All apalication is run well as python manage.py runserver:

centos6.2 python2.7(/opt/python2.7.2)

hpptd.conf

<VirtualHost *:80>

    ServerAdmin matt@360yuer.com
    ServerName www.360yuer.com
    DocumentRoot /home/WorkSpace/fenxiang

    WSGIScriptAlias / /home/WorkSpace/fenxiang/apache/fenxiang.wsgi

    Alias /site_media/ /home/WorkSpace/fenxiang/site_media/
    Alias /upfiles/ /home/WorkSpace/fenxiang/askbot/upfiles/

    Alias /static/ /home/WorkSpace/fenxiang/static/ 
    AddType text/html .py

    <Directory  /home/WorkSpace/fenxiang/apache >
       Order allow,deny
        Allow from all
    </Directory>

    <Directory /home/WorkSpace/fenxiang/site_media>
        AllowOverride None
        Options None
        Order deny,allow
        Allow from all
    </Directory>
    <Directory /home/WorkSpace/fenxiang/askbot/upfiles>
                Order deny,allow
                Allow from all
        </Directory>

    <Directory /home/WorkSpace/fenxiang/static>
        Order deny,allow
        Allow from all
    </Directory>

</VirtualHost>

I am a newer, and I do not know how to fix it , the current problem is can not find the /askbot/upfiles/3.jpg, and some css in /static/css

settings.py

 STATICFILES_DIRS = (os.path.join(ASKBOT_ROOT, 'skins'), os.path.join(PROJECT_ROOT, "static"), ASKBOT_EXTRA_SKINS_DIR)
 RECAPTCHA_USE_SSL = True
Rostyslav Dzinko
  • 39,424
  • 5
  • 49
  • 62

1 Answers1

1

Instead of:

/askbot/upfiles/3.jpg

you should be using URL with:

/upfiles/3.jpg

in it. That is what you have Alias set up for.

As for CSS files, are they actually in the directory:

/home/WorkSpace/fenxiang/static/css/
Graham Dumpleton
  • 57,726
  • 6
  • 119
  • 134