我在一个Saucy EC2实例上有一个Django项目,通过django注册来处理一个站点的注册,在几分钟和几个尝试注册不同的电子邮件地址之后,我没有看到任何注册用户的电子邮件。 (唯一存在的用户是在注册期间创build的用户。)settings.py文件具有: EMAIL_HOST = 'localhost' EMAIL_PORT = 25 EMAIL_HOST_USER = '' EMAIL_HOST_PASSWORD = '' 当我通过端口25 telnet会话手动发送testing消息时,手动电子邮件到达正常。 (我有Postfix安装。) 我应该怎么做才能使django-registration发送电子邮件? 我尝试将EMAIL_HOST_USER设置为有效的电子邮件地址,并再次注册了新用户,但是这并没有在我的收件箱中产生任何结果。
我一直试图通过钩子或骗子得到/pipe理/静态/服务在Apache SSL VirtualHost,最好由Apache(这是转发SSLstream量到Django Gunicorn实例),或禁止Apache,至lessGunicorn服务静态的内容,而我的工作更好的解决scheme。 我得到一个Apache服务的403,我检查过的所有权限都表明/usr/lib/python2.7/dist-packages/django/contrib/admin/static/目录(和父母根据需要)是由运行服务器的用户可读和可执行。 你可以看到在下面的VirtualHost中有什么错误,这将解释为什么Apache没有提供有问题的目录作为别名目录? <VirtualHost *:443> ServerName ccachicago.pragmatometer.com Alias /media/ "/home/jonathan/ccachicago/media/" <Directory "/home/jonathan/ccachicago/media/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> Alias /admin/static/ "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/" <Directory "/usr/lib/python2.7/dist-packages/django/contrib/admin/static/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> ProxyPass /media/ ! […]
我是configuration服务器的新手,我有问题让PHP使用我的django应用程序在nginx上使用UWSGI。 Django的伟大作品使用uwsgi和PHP伟大的时候,我删除了Django网站的conf,但是当我一起使用Django和PHP一起PHP文件不工作(浏览器只是下载它们),任何想法(请具体我是新来的东东)? 我接受build议,在这里变得有点绝望。 谢谢 这里是我的nginx的django站点conf文件: # mysite_nginx.conf #################### # the upstream component nginx needs to connect to upstream django { # server unix:///home/appdeploy/uwsgi-tutorial/mysite/mysite.sock; # for a file socket server 127.0.0.1:8001; # for a web port socket (we'll use this first) } # configuration of the server server { # the port your site will be […]
我已经设置了我的lighttpd的方式,redirect到我的主域名的所有子域以下面的方式* .domain.com – > domain.com 。 不幸的是,当我input一个像www.domain.com这样的子域名时,它直接进入了http://domain.com/site.fcgi/并且从字面上打破了页面。 当我排除子域它打开完美的页面。 以下使用lighttpd设置: $HTTP["host"] =~ "\.domain\.com(:[0-9]+)?$" { url.redirect = ("^/(.*)" => "http://domain.com/$1") } $HTTP["host"] =~ "^domain\.com(:[0-9]+)?$" { server.document-root = "/var/www/servers/domain.com/awesomesite" accesslog.filename = "/var/www/logs/domain.com/access.log" server.errorlog = "/var/www/logs/domain.com/error.log" fastcgi.server = ( ".fcgi" => ( "main" => ( # Use host / port instead of socket for TCP fastcgi "bin-path" => "/var/www/servers/domain.com/awesomesite/domain.fcgi", […]
我最近在我的(基于Fedora12的)服务器上安装了munin。 现在,我想把所有的图表都放在一个静态目录中(应用程序在Django上运行)。 所以,我编辑文件/etc/munin/munin.conf通过设置htmldir作为我的静态文件夹的绝对path。 然后,当我做了一个munin-cron ,我得到了以下错误: This program will easily break if you run it as root as you are trying now. Please run it as user 'nobody'. The correct 'su' command on many systems is 'su – munin –shell=/bin/bash' Aborting. 所以,我改变了用户,并尝试运行与用户一样的munin 。 然后我得到以下错误: [ERROR] Could not copy contents from /etc/munin/static/ to /[path to static file] […]
我有一个网站是完全运行在一些旧的Ubuntu服务器上的Apache,也有它的HTTPS。 但现在由于某些原因,我需要移动到不同的(高configuration新的Ubuntu服务器)服务器,并尝试使用Nginx服务我的网站,所以安装nginx( nginx/1.4.6 (Ubuntu) )。 以下是我的nginx.conf文件设置 server { listen 8005; location / { proxy_pass http://127.0.0.1:8001; } location /static/ { alias /root/apps/project/static/; } location /media/ { alias /root/apps/media/; } } # Https Server server { listen 443; location / { # proxy_set_header Host $host; # proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; # proxy_set_header X-Forwarded-Protocol $scheme; # proxy_set_header X-Url-Scheme $scheme; […]
我得到这个错误: nginx:[emerg]在/etc/nginx/sites-enabled/django.save:1中重复上游“app_server” 这是我的configuration文件: upstream app_server { server 127.0.0.1:9000 fail_timeout=0; } server { listen 80 default_server; listen [::]:80 default_server ipv6only=on; root /usr/share/nginx/html; index index.html index.htm; client_max_body_size 4G; server_name _; keepalive_timeout 5; # Your Django project's media files – amend as required location /media { alias /home/django/django_project/django_project/media; } # your Django project's static files – amend as […]
我已经在CentOS 6 VPS上从源代码安装了Python2.7,并且想要启动并运行一个Django站点。 不幸的是,到目前为止Googlesearch的所有内容都表明我需要安装mod_wsgi,这意味着我需要用–enable-shared标志重新安装Python2.7。 我需要先卸载Python2.7吗? 我怎样才能安装mod_wsgi没有完全搞乱我的系统? 提前致谢。 我一直没有find一个新手友好的指南。
我试图用nginx在我的网站上设置一个静态页面。 该文件夹有一个index.html文件以及一些静态文件。 目录结构看起来像这样 olx –static –fonts –index.html 这是我想如何服务index.html页面。 location /olx { root /mypath/olx; default_type "text/html"; try_files $uri $uri.html $uri/index.html index.html; } 这给了我一个404错误。 任何帮助?
主pipe和gunicorn我有一个非常奇怪的问题。 我阅读主pipe文档 ,所有相关的博客文章, stackexchange 问题,但他们都没有解决我的奇怪的问题,我甚至不知道在哪里看得更远。 我的主pipeconfiguration: [program:djangoapp] user = regularuser directory = /path/to/djangoapp command = /path/to/djangoapp/.venv/bin/gunicorn –debug –log-file – –log-level debug –name arlista –workers 9 –pythonpath /path/to/necessary/library/source/Python djangoapp.wsgi:application stdout_logfile = /path/to/logfolder/djangoapp.log autorestart = true redirect_stderr = true environment = GPG_PASSPHRASE="a_passhprase_with_a_comma_in_it", DJANGO_SETTINGS_MODULE="myapp.settings.production", DJANGO_SECRET_KEY="secret_key_working_fine", DJANGO_DB_ENGINE="django.db.backends.mysql", DJANGO_DB_HOST="localhost", DJANGO_DB_NAME="dbname", DJANGO_DB_USER="dbuser", DJANGO_DB_PASSWORD="dbpassword", DJANGO_MEDIA_ROOT="/path/to/djangoapp/media", DJANGO_STATIC_ROOT="/path/to/djangoapp/static_root", # a couple more environment variables […]