Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Not found + Nginx #9

Open
bartmika opened this issue Jun 27, 2016 · 5 comments
Open

Page Not found + Nginx #9

bartmika opened this issue Jun 27, 2016 · 5 comments

Comments

@bartmika
Copy link

I manage to get this library working on desktop, but when I try in a FreeBSD 10.2 environment with gunicorn and nginx, I keep getting a 404 error.

Page not found (404)
Request Method: GET
Request URL:    http://luchacomics.com/en/
Raised by:  cms.views.details
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.

Inside my console screen I get the following output:

/usr/home/django/djangocms-cloudmasterstudios/env/lib/python3.4/site-packages/multisite/hacks.py:19: RuntimeWarning: 'default' cache is LocMemCache, which may cause stale caches.
  site_cache = SiteCache()

/usr/home/django/djangocms-cloudmasterstudios/env/lib/python3.4/site-packages/multisite/hacks.py:19: RuntimeWarning: 'default' cache is LocMemCache, which may cause stale caches.
  site_cache = SiteCache()

/usr/home/django/djangocms-cloudmasterstudios/env/lib/python3.4/site-packages/multisite/hacks.py:19: RuntimeWarning: 'default' cache is LocMemCache, which may cause stale caches.
  site_cache = SiteCache()

   New revision!!!! RELOAD!
      3f8b3e18-dd1e-4af7-8096-c5b9c125862a (<class 'str'>)
   -> None (<class 'NoneType'>)
reverse('my_test_app_view'): Reverse for 'my_test_app_view' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
reverse('my_test_app_view'): Reverse for 'my_test_app_view' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

My nginx looks like follows:

server {
        server_name luchacomics.com;

        access_log off;

        gzip on;  # Requires 'HTTP_GUNZIP_FILTER' module.

        client_max_body_size 0;  # Unlimited Upload File Size

        location / {
            proxy_pass_header Server;
        proxy_set_header Host $http_host;
        proxy_redirect off;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_connect_timeout 10;
        proxy_read_timeout 10;
        proxy_pass http://localhost:8001/;
        }
  }

My gunicorn is:

command = '/usr/home/django/djangocms-cloudmasterstudios/env/bin/gunicorn'
pythonpath = '/usr/home/django/djangocms-cloudmasterstudios'
bind = '127.0.0.1:8001'
workers = 3

I don't understand why I am getting this problem and am wondering if you get something similar? I get this error when I want to try this out in a server environment.

@rodolfomartinez
Copy link

Definitely a +1 here - any help?

@yakky
Copy link
Member

yakky commented Jul 4, 2016

@bartmika @rodolfomartinez I'll try a deployment. In the meantime, could you try adding the following directives to nginx::

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;

@jedie
Copy link
Contributor

jedie commented Jul 21, 2016

I tried multisite with the development server and always get 404... Think the urls are not really setup correctly.

@yakky
Copy link
Member

yakky commented Sep 25, 2018

Hopefully the new readme in #20 should make the setup easier

@Ballpin
Copy link

Ballpin commented Feb 7, 2019

@jedie I'm reciving the same thing here in development server. Followed the instructions careful and i have my urls.py file in project_name/config/urls.py. If i type example.local i keep reciving the regular django 404 page.

Sidenote i use docker though.

MULTISITE_CMS_URLS={
    'www.example.local': 'config.urls',
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants