You say that you "run manage.py collectstatic and everything is fine when i use
the root url. |http//10.184.2.231| it is ok and static files are served
properly", and then you say that http://www.mydomain/static/images/giphy.gif
gives 404 (Not Found).

Is |http//10.184.2.231/|static/images/giphy.gif working?

If not, why are you saying that "static files are served properly"?

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com


On 03/08/2017 04:12 PM, valerio orfano wrote:
>
>       
>
> I've been facing the following problem. I got django 1.9 integrated with
> apache 2.4+ via mod_wsgi application. I run manage.py collectstatic and
> everything is fine when i use the root url. |http//10.184.2.231| it is ok and
> static files are served properly.
>
> Actually i will be redirected to my django app from the link
> |www.mydomain.com/nuovopatentdb|
>
> This is my configuration
>
> |fromurls.py fromdjango.conf.urls importurl from.importviews urlpatterns
> =[url(r'^$',views.search_ES,name='search_ES'),url(r'^nuovopatentdb$',views.search_ES,name='search_ES'),url(r'^download/(?P<id_src>.*)$',views.send_file,name="download"),url(r"^documents$",views.documents,name="documents"),]#settings.pySTATIC_URL
> ='/static/'STATIC_ROOT =os.path.join(BASE_DIR,'static')WSGI_APPLICATION
> ='ES_Brevetti.wsgi.application'INSTALLED_APPS
> =['django.contrib.admin','django.contrib.auth','django.contrib.contenttypes','django.contrib.sessions','django.contrib.messages','django.contrib.staticfiles','patentdb.apps.patentdbConfig','mod_wsgi.server','el_pagination',]#httpconf.dAlias'/static''/home/elastic/workspace/ES_Brevetti/static'<Directory'/home/elastic/workspace/ES_Brevetti/static'><IfVersion<2.4>Orderallow,deny
> Allowfromall </IfVersion><IfVersion>=2.4>Requireall granted
> </IfVersion></Directory>|
>
> This is an example of my template:
>
> |<divid="waitLoading"><imgsrc="{%static "images/giphy.gif"%}"></div>|
>
> The image giphy.gif cannot be served and i get the3 follwoing error: GET
> http://www.mydomain/static/images/giphy.gif 404 (Not Found)
>
> How can i work this around? Many many thanx for ur help
>
> -- 
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com
> <mailto:django-users+unsubscr...@googlegroups.com>.
> To post to this group, send email to django-users@googlegroups.com
> <mailto:django-users@googlegroups.com>.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e2063b5e-9c9e-4802-9439-33e0c69304c8%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/e2063b5e-9c9e-4802-9439-33e0c69304c8%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/25dd2369-710f-0020-89ff-b312bd4f472f%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to