apache - Serving Django application from relative path -
I am developing a Django application which works fine at the local level. In production, a relative path will be applied, such as I am using Apache with mod_wsgi, and I have configured Apache to serve the application from a relative URL: Unfortunately, I get a 404 error. Debug info, however, is very mysterious. If I try to get It looks like Django - correctly guesses that the path is I have also tried to add the setting but nothing changes - error The message remains the same. The information about the debug is: - Trying with more acceptable regexs in / URL config; Iwas able to get a page From there I could print To make it work, I instead www.example.com/app / .
WSGIScriptAlias / app / Path / to / my / modwsgi.py WSGIDaemon Process app display-name = app_wsgi
www.example.com/app/myurl/ , then what ango says
myurl / , and not
app / myurl / . However, although
myurl / clearly matches
^ myurl / $ , this is not a match.
FORCE_SCRIPT_NAME = '/ app'
request.path , and it turned out to be
app / myurl / .
FORCE_SCRIPT_NAME = '' STATIC_URL = '/ app / static /' MEDIA_URL = '/ app / media /'
Comments
Post a Comment