Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » Odd problem with static files and Lighttpd [RSS Feed]

#1 Jan. 17, 2011 12:37:58

s.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Odd problem with static files and Lighttpd


Hi to everybody,
I'm facing with a curious problem with Lighttpd and static files
serving.
Media admin is served by Lighttpd, but mymedia is not served by
Lighttpd.

This is a snippet of my lighttpd.conf

alias.url = (
"/mymedia/" => "/home/osmtools/mymedia/",
"/media/" => "/usr/lib/python2.5/site-packages/django/contrib/
admin/media/",
)

url.rewrite-once = (
"^(/media.*)$" => "/$1",
"^(/mymedia.*)$" => "/$1",
"^/favicon\.ico$" => "/media/favicon.ico",
"^(/.*)$" => "/osmtools.fcgi$1",
)

The result is that in the admin site css and js work well (http://
osmtool.com/admin) but in the user site neither the css and the js are
loaded (http://osmtool.com).

Any idea?

Thanks

Alex

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 17, 2011 12:57:14

Cal L.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Odd problem with static files and Lighttpd


Hi Alex,

Have you checked to make sure that /home/osmtools/mymedia has read-able
permissions for the lighttpd user?

Cal

On Mon, Jan 17, 2011 at 10:41 AM, sdonk <alessandro.den...@gmail.com> wrote:

> Hi to everybody,
> I'm facing with a curious problem with Lighttpd and static files
> serving.
> Media admin is served by Lighttpd, but mymedia is not served by
> Lighttpd.
>
> This is a snippet of my lighttpd.conf
>
> alias.url = (
> "/mymedia/" => "/home/osmtools/mymedia/",
> "/media/" => "/usr/lib/python2.5/site-packages/django/contrib/
> admin/media/",
> )
>
> url.rewrite-once = (
> "^(/media.*)$" => "/$1",
> "^(/mymedia.*)$" => "/$1",
> "^/favicon\.ico$" => "/media/favicon.ico",
> "^(/.*)$" => "/osmtools.fcgi$1",
> )
>
> The result is that in the admin site css and js work well (http://
> osmtool.com/admin) but in the user site neither the css and the js are
> loaded (http://osmtool.com).
>
> Any idea?
>
> Thanks
>
> Alex
>
> --
> 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<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
>http://groups.google.com/group/django-users?hl=en.
>
>

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 17, 2011 18:31:15

John F.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Odd problem with static files and Lighttpd


What do the lighttpd logs say?


On 1/17/11 2:41 AM, sdonk wrote:Hi to everybody,
I'm facing with a curious problem with Lighttpd and static files
serving.
Media admin is served by Lighttpd, but mymedia is not served by
Lighttpd.

This is a snippet of my lighttpd.conf

alias.url = (
"/mymedia/" => "/home/osmtools/mymedia/",
"/media/" => "/usr/lib/python2.5/site-packages/django/contrib/
admin/media/",
)

url.rewrite-once = (
"^(/media.*)$" => "/$1",
"^(/mymedia.*)$" => "/$1",
"^/favicon\.ico$" => "/media/favicon.ico",
"^(/.*)$" => "/osmtools.fcgi$1",
)

The result is that in the admin site css and js work well (http://
osmtool.com/admin) but in the user site neither the css and the js are
loaded (http://osmtool.com).

Any idea?

Thanks

Alex--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 17, 2011 19:39:08

s.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Odd problem with static files and Lighttpd


Changed the permission and all works good!
Thanks.

On Jan 17, 1:56 pm, "Cal Leeming "
<cal.leem...@simplicitymedialtd.co.uk> wrote:
> Hi Alex,
>
> Have you checked to make sure that /home/osmtools/mymedia has read-able
> permissions for the lighttpd user?
>
> Cal
>
> On Mon, Jan 17, 2011 at 10:41 AM, sdonk <alessandro.den...@gmail.com> wrote:
> > Hi to everybody,
> > I'm facing with a curious problem with Lighttpd and static files
> > serving.
> > Media admin is served by Lighttpd, but mymedia is not served by
> > Lighttpd.
>
> > This is a snippet of my lighttpd.conf
>
> > alias.url = (
> >        "/mymedia/" => "/home/osmtools/mymedia/",
> >        "/media/" => "/usr/lib/python2.5/site-packages/django/contrib/
> > admin/media/",
> > )
>
> > url.rewrite-once = (
> >        "^(/media.*)$" => "/$1",
> >       "^(/mymedia.*)$" => "/$1",
> >        "^/favicon\.ico$" => "/media/favicon.ico",
> >        "^(/.*)$" => "/osmtools.fcgi$1",
> > )
>
> > The result is that in the admin site css and js work well (http://
> > osmtool.com/admin) but in the user site neither the css and the js are
> > loaded (http://osmtool.com).
>
> > Any idea?
>
> > Thanks
>
> > Alex
>
> > --
> > 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<django-users%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

  • Root
  • » Django
  • » Odd problem with static files and Lighttpd [RSS Feed]

Board footer

Moderator control

Enjoy the 20th of October
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support