Re: static file problem with modwsgi+ apache2 with django1.3

2011-12-10 Thread Jisson Varghese
@ Ramiro Morales Thank you for your response, *edit the configuration file
as you suggested ,But still am facing the problem.*
I have one doubt about the configuration
I used collectstatic command for static files,
STATIC_ROOT =
'/home/jisson/Desktop/testcloud.aws/DjangoApis/teststaticfiles/'
 STATIC_URL = '/static/'

Whether I add static or teststaticfiles in the last of following line now
am added  'static'

 Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static/


teststaticfiles - is the directory in my project where collect static
command collects and save all of my static contents.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: static file problem with modwsgi+ apache2 with django1.3

2011-12-10 Thread Ramiro Morales
On Sat, Dec 10, 2011 at 7:01 AM, Jiss  wrote:
> Settings.py
> STATIC_ROOT = '/home/jisson/Desktop/testcloud.aws/DjangoApis/
> teststaticfiles/'

This is wrong (although it shouldn' t affect your apache+mod_wsgi deployment),
 per the tree structure you posted earlier, you don't have a teststaticfiles
directory.

>
> /etc/apache2/sites/enabled/DjangoApis:
>
> [...]
> Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static
> 
> Order deny,allow
> Allow from all
> 
>
> [...]
>
> apache errorlog:
> tail /var/log/apache2/error.log
> [Sat Dec 10 03:16:36 2011] [error] [client 127.0.0.1] File does not
> exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticjs,
> referer: http://test.webapp/

Looks like you are missing a trailing / in the Alias definition. i.e.
it should read:

Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static/

(see https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/)

but the fact that all the error log entries are about subdirectories
of the static dir (js, images) but no about actual static files is a
bit strange.

-- 
Ramiro Morales

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



static file problem with modwsgi+ apache2 with django1.3

2011-12-10 Thread Jiss
Hi all,
 I am new to django and web development. I am facing a problem
with static files(Django1.3) when tried to deploy it in my local
apache server(apache2+mod_wsgi),the problem only for the static
contents other parts ok[its worked in the devlopment server].
My project now in a folder 'testcloud' in Ubandu Desktop,My project
name is DjangoApis,Following is my project structure:
Desktop->testcloud:

DjangoApis
  urls.py
  mywebapp
 static
 templates
 templatetags
 urls.py
 views.py
  myapis
   .
Settings.py
STATIC_ROOT = '/home/jisson/Desktop/testcloud.aws/DjangoApis/
teststaticfiles/'
 STATIC_URL = '/static/'

TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.media",
"django.core.context_processors.static",
)

TEMPLATE_DIRS = (
os.path.join(os.path.dirname(__file__),'templates').replace('\
\','/'),
)
INSTALLED_APPS = (
'DjangoApis.mywebapp',
'DjangoApis.myapis',
)
STATICFILES_DIRS = (
  os.path.join(os.path.dirname(__file__),'static').replace('\
\','/'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
)

/etc/apache2/sites/enabled/DjangoApis:

Alias /favicon.ico /home/jisson/Desktop/testcloud.aws/DjangoApis/
static/favicon.ico
AliasMatch ^/([^/]*\.css) /home/jisson/Desktop/testcloud.aws/
DjangoApis/static/styles/$1
Alias /static/ /home/jisson/Desktop/testcloud.aws/DjangoApis/static

Order deny,allow
Allow from all

WSGIScriptAlias / /home/jisson/Desktop/testcloud.aws/DjangoApis/
django.wsgi

apache errorlog:
tail /var/log/apache2/error.log
[Sat Dec 10 03:16:36 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticjs,
referer: http://test.webapp/
[Sat Dec 10 03:16:36 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticjs,
referer: http://test.webapp/
[Sat Dec 10 03:16:36 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticjs,
referer: http://test.webapp/
[Sat Dec 10 03:16:36 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticjs,
referer: http://test.testapp/
[Sat Dec 10 03:16:45 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticimages,
referer: http://test.webapp/
[Sat Dec 10 03:16:45 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticimages,
referer: http://test.webapp/
[Sat Dec 10 03:16:45 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticimages,
referer: http://test.webapp/
[Sat Dec 10 03:16:45 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticimages,
referer: http://test.webapp/
[Sat Dec 10 03:16:45 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticimages,
referer: http://test.webapp/
[Sat Dec 10 03:16:45 2011] [error] [client 127.0.0.1] File does not
exist: /home/jisson/Desktop/testcloud.aws/DjangoApis/staticimages,
referer: http://testwebapp/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.