mirror of
https://github.com/modoboa/modoboa.git
synced 2026-04-27 09:55:58 +03:00
[GH-ISSUE #590] Make modoboa work with uwsgi/nginx in a subdirectory #556
Labels
No labels
bug
bug
dependencies
design
documentation
duplicate
enhancement
enhancement
enhancement
feedback-needed
help-needed
help-needed
installer
invalid
looking-for-sponsors
modoboa-contacts
new-ui
new-ui
pr
pull-request
pyconfr
python
question
security
stale
webmail
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/modoboa-modoboa#556
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @piwats on GitHub (Jul 30, 2014).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/590
Hell there,
Modoboa refuses to work with nginx and uwsgi:
1.) nginx config:
server {
server_name wohooo.com;
listen 80;
listen [::]:80;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl spdy;
#listen [::]:443 ipv6only=on ssl spdy;
server_name wohooo.com;
}
2.) uwsgi config file:
[uwsgi]
Not needed when using uwsgi from pip
plugins = python27
chdir = /var/www/mail/admin/
module = admin.wsgi:application
master = true
harakiri = 30
sharedarea = 4
processes = 4
vhost = true
no-default-app = true
3.) Settingd from settings.py:
LOGIN_URL = '/modoboa/accounts/login/'
MEDIA+SITESTATIC PATHS set according to nginx conf.
THE ERRORS I GET:
Page not found (404)
Request Method: POST
Request URL: https://wohooo.com/modoboa/accounts/login/
Using the URLconf defined in admin.urls, Django tried these URL patterns, in this order:
^$
^jsi18n/$
^accounts/login/$
^accounts/logout/$
^core/$
^core/parameters/$
^core/parameters/save/$
^core/extensions/$
^core/extensions/save/$
^core/info/$
^core/logs/$
^user/$
^user/preferences/$
^user/profile/$
^user/forward/
^admin/
^postfix_relay_domains/
^limits/
^webmail/
^stats/
^sfilters/
^quarantine/
^modoboa/sitestatic/(?P.)$
^modoboa/media/(?P.)$
The current URL, modoboa/accounts/login/, didn't match any of these.
You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 404 page.
@piwats commented on GitHub (Aug 2, 2014):
Finally a solution:
add
uwsgi_param SCRIPT_NAME /<subdirs_name>;
uwsgi_modifier1 30;
to the /<subdirs_name> location
:)
-Enchancement to docs