Jump to content

Recommended Posts

Posted

[Sat Nov 18 15:41:29.007142 2017] [core:error] [pid 16181:tid 139824572905216] [client x.x.x.x:58347] AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace., referer: http://django.area51.bailey.cf/projects/
That probably means you have conflicting .htaccess bouncing you back and forth.
Posted

Https versus http shouldn't affect django in the slightest. Most likely you have conflicting .htaccess resulting in an infinite loop like I told you somewhere else on the forums.

Posted (edited)

No I don't mean SSL, I can't get it to work on the root directory of Bailey.cf. I want to view it at https://Bailey.cf/ instead of https://Bailey.cf/djangotest

Sorry for the confusion

 

--DONE--

 

I've fixed it, thank you for your help!

Edited by Bailey
Posted

The django wiki page http://wiki.helionet.org/Django has an example of two static resources directories: media and admin_media.

RewriteEngine On
RewriteBase /
RewriteRule ^(media/.*)$ - [L]
RewriteRule ^(admin_media/.*)$ - [L]
RewriteRule ^(hello/dispatch\.wsgi/.*)$ - [L]
RewriteRule ^(.*)$ hello/hello/dispatch.wsgi/$1 [QSA,PT,L]
The [L] means last so when that rule is matched it stop going down the line. Since it stops before it forces everything to be processed through dispatch.wsgi it is served statically. Likewise if your request already has dispatch.wsgi in it it doesn't tack another dispatch.wsgi on there. Finally everything else is forced to go through dispatch.wsgi. To add another static directory just copy the media or admin_media line and replace it with the name of your directory.
Posted

Oh yeah, I know about Rewrite and the flags but I dont have an actual static directory. I used the Django tutorial to create the polls but I named it projects

Posted

"django.contrib.staticfiles" provides a convenience management command for gathering static files in a single directory so you can serve them easily.

Set the

STATIC_ROOT

setting to the directory from which you’d like to serve these files, for example:

STATIC_ROOT = "/var/www/example.com/static/"

Run the collectstatic management command:

$ python manage.py collectstatic

This will copy all files from your static folders into the STATIC_ROOT directory.

 

Had to do this to store static files and get them to work when they are uploaded



https://bailey.cf/admin/login/?next=/admin/

https://bailey.cf/projects/

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...