Уведомления

Группа в Telegram: @pythonsu
  • Начало
  • » Django
  • » nginx, uwsgi, sentry, https "Неверное перенаправление на странице" [RSS Feed]

#1 Окт. 7, 2013 09:32:45

svas
От:
Зарегистрирован: 2010-01-27
Сообщения: 239
Репутация: +  9  -
Профиль   Отправить e-mail  

nginx, uwsgi, sentry, https "Неверное перенаправление на странице"

Пытаюсь настроить sentry в связке с nginx и uwsgi.
конфиг nginx

location /sentry {
include uwsgi_params;
uwsgi_param SCRIPT_NAME /sentry;
uwsgi_pass unix:/run/uwsgi/app/sentry/socket;
}
конфиг uwsgi
[uwsgi]
plugins = python27
env = SENTRY_CONF=/var/www/sentry/sentry.conf.py
virtualenv = /var/www/virtualenvs/sentry
module = sentry.wsgi
master = true
processes = 4
daemonize = /var/log/uwsgi/sentry.log
Проблема в том, что при попытке зайти на урл /sentry/, меня перенаправляет на /sentry/login/ (думаю эт нормально, я не залогинен) и оттуда много редиректов опять же на /sentry/login/
Не могу понять в чем проблема.



Офлайн

#2 Окт. 7, 2013 10:04:59

daniel
Зарегистрирован: 2012-04-05
Сообщения: 25
Репутация: +  0  -
Профиль   Отправить e-mail  

nginx, uwsgi, sentry, https "Неверное перенаправление на странице"

Покажите настройки sentry.




Hosting4Django - качественный хостинг для Django-проектов

Офлайн

#3 Окт. 7, 2013 10:09:15

svas
От:
Зарегистрирован: 2010-01-27
Сообщения: 239
Репутация: +  9  -
Профиль   Отправить e-mail  

nginx, uwsgi, sentry, https "Неверное перенаправление на странице"

# This file is just Python, with a touch of Django which means you
# you can inherit and tweak settings to your hearts content.
from sentry.conf.server import *

import os.path

CONF_ROOT = os.path.dirname(__file__)

DATABASES = {
'default': {
# You can swap out the engine for MySQL easily by changing this value
# to ``django.db.backends.mysql`` or to PostgreSQL with
# ``django.db.backends.postgresql_psycopg2``

# If you change this, you'll also need to install the appropriate python
# package: psycopg2 (Postgres) or mysql-python
'ENGINE': 'django.db.backends.sqlite3',

'NAME': os.path.join(CONF_ROOT, 'sentry.db'),
'USER': 'postgres',
'PASSWORD': '',
'HOST': '',
'PORT': '',

# If you're using Postgres, we recommend turning on autocommit
# 'OPTIONS': {
# 'autocommit': True,
# }
}
}


# If you're expecting any kind of real traffic on Sentry, we highly recommend
# configuring the CACHES and Redis settings

###########
## CACHE ##
###########

# You'll need to install the required dependencies for Memcached:
# pip install python-memcached
#
# CACHES = {
# 'default': {
# 'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
# 'LOCATION': ['127.0.0.1:11211'],
# }
# }

###########
## Queue ##
###########

# See http://sentry.readthedocs.org/en/latest/queue/index.html for more
# information on configuring your queue broker and workers. Sentry relies
# on a Python framework called Celery to manage queues.

# You can enable queueing of jobs by turning off the always eager setting:
# CELERY_ALWAYS_EAGER = False
# BROKER_URL = 'redis://localhost:6379'

####################
## Update Buffers ##
####################

# Buffers (combined with queueing) act as an intermediate layer between the
# database and the storage API. They will greatly improve efficiency on large
# numbers of the same events being sent to the API in a short amount of time.
# (read: if you send any kind of real data to Sentry, you should enable buffers)

# You'll need to install the required dependencies for Redis buffers:
# pip install redis hiredis nydus
#
# SENTRY_BUFFER = 'sentry.buffer.redis.RedisBuffer'
# SENTRY_REDIS_OPTIONS = {
# 'hosts': {
# 0: {
# 'host': '127.0.0.1',
# 'port': 6379,
# }
# }
# }

################
## Web Server ##
################

# You MUST configure the absolute URI root for Sentry:
SENTRY_URL_PREFIX = 'https://sentry.example.com' # No trailing slash!

# If you're using a reverse proxy, you should enable the X-Forwarded-Proto
# header, and uncomment the following setting
# SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

SENTRY_WEB_HOST = '0.0.0.0'
SENTRY_WEB_PORT = 9000
SENTRY_WEB_OPTIONS = {
'workers': 3, # the number of gunicorn workers
'secure_scheme_headers': {'X-FORWARDED-PROTO': 'https'},
}

#################
## Mail Server ##
#################

# For more information check Django's documentation:
# https://docs.djangoproject.com/en/1.3/topics/email/?from=olddocs#e-mail-backends

EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'

EMAIL_HOST = 'localhost'
EMAIL_HOST_PASSWORD = ''
EMAIL_HOST_USER = ''
EMAIL_PORT = 25
EMAIL_USE_TLS = False

# The email address to send on behalf of
SERVER_EMAIL = 'root@localhost'

###########
## etc. ##
###########

# If this file ever becomes compromised, it's important to regenerate your SECRET_KEY
# Changing this value will result in all current sessions being invalidated
SECRET_KEY = '...'

# http://twitter.com/apps/new
# It's important that input a callback URL, even if its useless. We have no idea why, consult Twitter.
TWITTER_CONSUMER_KEY = ''
TWITTER_CONSUMER_SECRET = ''

# http://developers.facebook.com/setup/
FACEBOOK_APP_ID = ''
FACEBOOK_API_SECRET = ''

# http://code.google.com/apis/accounts/docs/OAuth2.html#Registering
GOOGLE_OAUTH2_CLIENT_ID = ''
GOOGLE_OAUTH2_CLIENT_SECRET = ''

# https://github.com/settings/applications/new
GITHUB_APP_ID = ''
GITHUB_API_SECRET = ''

# https://trello.com/1/appKey/generate
TRELLO_API_KEY = ''
TRELLO_API_SECRET = ''

# https://confluence.atlassian.com/display/BITBUCKET/OAuth+Consumers
BITBUCKET_CONSUMER_KEY = ''
BITBUCKET_CONSUMER_SECRET = ''

ALLOWED_HOSTS = [...]



Офлайн

#4 Окт. 7, 2013 10:19:26

daniel
Зарегистрирован: 2012-04-05
Сообщения: 25
Репутация: +  0  -
Профиль   Отправить e-mail  

nginx, uwsgi, sentry, https "Неверное перенаправление на странице"

Укажите корректный SENTRY_URL_PREFIX для начала.




Hosting4Django - качественный хостинг для Django-проектов

Офлайн

#5 Окт. 7, 2013 10:47:51

svas
От:
Зарегистрирован: 2010-01-27
Сообщения: 239
Репутация: +  9  -
Профиль   Отправить e-mail  

nginx, uwsgi, sentry, https "Неверное перенаправление на странице"

То же самое



Офлайн

#6 Окт. 15, 2013 11:14:08

daniel
Зарегистрирован: 2012-04-05
Сообщения: 25
Репутация: +  0  -
Профиль   Отправить e-mail  

nginx, uwsgi, sentry, https "Неверное перенаправление на странице"

uwsgi_param SCRIPT_NAME /sentry;

Не уверен, что нужно хардкодом указывать эту переменную. Уберите её, зачем Вы её указали?




Hosting4Django - качественный хостинг для Django-проектов

Офлайн

  • Начало
  • » Django
  • » nginx, uwsgi, sentry, https "Неверное перенаправление на странице"[RSS Feed]

Board footer

Модераторировать

Powered by DjangoBB

Lo-Fi Version