Re: Deploying Django via wsgi

2016-06-28 Thread Coulson Kgathi
how did you do that? please assist

On Saturday, 19 March 2016 00:22:18 UTC+2, parall...@gmail.com wrote:
>
> Thank you all for your replies. It turned out to be something simple. 
> Since Django was installed in a virtualenv I needed to include the path to 
> the Django libs in the wsgi paths. Done and site up.
>
> Again thanks!
>
>
>
> On Tuesday, March 15, 2016 at 5:00:10 AM UTC-7, parall...@gmail.com wrote:
>>
>> Quite new, and trying to deploy first Django site. I keep getting 503 
>> errors. Here are the particulars, any hints as to what I'm doing wrong 
>> would be much appreciated! All directories and files are group owned and 
>> writable by www-data. Ubuntu server, and Apache2.4 server where I have root 
>> access. The tutorial where I got the howto is located here:
>>
>> https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
>>
>> Thank you!
>>
>> *File structure/location:*
>>
>> /home/user/kb_venv/project_name/
>> __init__.py
>> settings.py
>> urls.py
>> wsgi.py
>> manage.py
>> app_name
>>
>> /home/user/kb_venv/project_name/project_name/
>> apache/
>> __init__.py
>> override.py
>> wsgi.py
>>
>>
>> *override.py file contents:*
>> from project_name.settings import
>> DEBUG = True
>> #ALLOWED_HOSTS = ['104.131.154.99'] (no domain name, I'm using IP to 
>> access the site)
>>
>> *wsgi.py file contents:*
>> #wsgi.py
>> import os, sys
>> # Calculate the path based on the location of the WSGI script.
>> apache_configuration= os.path.dirname(__file__)
>> project = os.path.dirname(apache_configuration)
>> workspace = os.path.dirname(project)
>> sys.path.append(workspace)
>> sys.path.append(project)
>>
>> # Add the path to 3rd party django application and to django itself.
>> sys.path.append('/home/smlake/kb_venv')
>> os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.apache.override'
>> from django.core.wsgi import get_wsgi_application
>> application = get_wsgi_application()
>>
>> *Apache2.4 000-default file:*
>> 
>>
>> WSGIScriptAlias / /home/smlake/kb_venv/project_name/apache/wsgi.py
>> 
>>   Require all granted
>> 
>> ServerAdmin parall...@gmail.com 
>> DocumentRoot /home/smlake/kb_venv/project_name/project_name
>>
>> ErrorLog ${APACHE_LOG_DIR}/error.log
>> CustomLog ${APACHE_LOG_DIR}/access.log combined
>>
>> 
>>
>>
>> *Apache error log entry:*
>> [Mon Mar 14 23:58:48.413099 2016] [authz_core:error] [pid 8034:tid 
>> 140480713053952] [client 54.188.195.80:57782] AH01630: client denied by 
>> server configuration: /home/user/kb_venv/project_name/
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/62362ac3-2fad-416a-ba71-d895141fc4cd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django via wsgi

2016-03-18 Thread parallaxplace
Thank you all for your replies. It turned out to be something simple. Since 
Django was installed in a virtualenv I needed to include the path to the 
Django libs in the wsgi paths. Done and site up.

Again thanks!



On Tuesday, March 15, 2016 at 5:00:10 AM UTC-7, parall...@gmail.com wrote:
>
> Quite new, and trying to deploy first Django site. I keep getting 503 
> errors. Here are the particulars, any hints as to what I'm doing wrong 
> would be much appreciated! All directories and files are group owned and 
> writable by www-data. Ubuntu server, and Apache2.4 server where I have root 
> access. The tutorial where I got the howto is located here:
>
> https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
>
> Thank you!
>
> *File structure/location:*
>
> /home/user/kb_venv/project_name/
> __init__.py
> settings.py
> urls.py
> wsgi.py
> manage.py
> app_name
>
> /home/user/kb_venv/project_name/project_name/
> apache/
> __init__.py
> override.py
> wsgi.py
>
>
> *override.py file contents:*
> from project_name.settings import
> DEBUG = True
> #ALLOWED_HOSTS = ['104.131.154.99'] (no domain name, I'm using IP to 
> access the site)
>
> *wsgi.py file contents:*
> #wsgi.py
> import os, sys
> # Calculate the path based on the location of the WSGI script.
> apache_configuration= os.path.dirname(__file__)
> project = os.path.dirname(apache_configuration)
> workspace = os.path.dirname(project)
> sys.path.append(workspace)
> sys.path.append(project)
>
> # Add the path to 3rd party django application and to django itself.
> sys.path.append('/home/smlake/kb_venv')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.apache.override'
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
> *Apache2.4 000-default file:*
> 
>
> WSGIScriptAlias / /home/smlake/kb_venv/project_name/apache/wsgi.py
> 
>   Require all granted
> 
> ServerAdmin parallaxpl...@gmail.com
> DocumentRoot /home/smlake/kb_venv/project_name/project_name
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> 
>
>
> *Apache error log entry:*
> [Mon Mar 14 23:58:48.413099 2016] [authz_core:error] [pid 8034:tid 
> 140480713053952] [client 54.188.195.80:57782] AH01630: client denied by 
> server configuration: /home/user/kb_venv/project_name/
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e62e0685-ce4e-44a2-8693-6e3cefeba776%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django via wsgi

2016-03-15 Thread Ryan Nowakowski
On Mon, Mar 14, 2016 at 09:01:46PM -0700, parallaxpl...@gmail.com wrote:
> Quite new, and trying to deploy first Django site. I keep getting 503 
> errors. Here are the particulars, any hints as to what I'm doing wrong 
> would be much appreciated! All directories and files are group owned and 
> writable by www-data. Ubuntu server, and Apache2.4 server where I have root 
> access. The tutorial where I got the howto is located here:
> https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
> 
> Thank you!
> 
> *File structure/location:*
> 
> /home/user/kb_venv/project_name/
> __init__.py
> settings.py
> urls.py
> wsgi.py
> manage.py
> app_name
> 
> /home/user/kb_venv/project_name/project_name/
> apache/
> __init__.py
> override.py
> wsgi.py
> 
> 
> *override.py file contents:*
> from project_name.settings import
> DEBUG = True
> #ALLOWED_HOSTS = ['104.131.154.99'] (no domain name, I'm using IP to access 
> the site)
> 
> *wsgi.py file contents:*
> #wsgi.py
> import os, sys
> # Calculate the path based on the location of the WSGI script.
> apache_configuration= os.path.dirname(__file__)
> project = os.path.dirname(apache_configuration)
> workspace = os.path.dirname(project)
> sys.path.append(workspace)
> sys.path.append(project)
> 
> # Add the path to 3rd party django application and to django itself.
> sys.path.append('/home/smlake/kb_venv')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.apache.override'
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
> 
> *Apache2.4 000-default file:*
> 
> 
> WSGIScriptAlias / /home/smlake/kb_venv/project_name/apache/wsgi.py
> 
>   Require all granted
> 
> ServerAdmin parallaxpl...@gmail.com
> DocumentRoot /home/smlake/kb_venv/project_name/project_name
> 
> ErrorLog ${APACHE_LOG_DIR}/error.log
> CustomLog ${APACHE_LOG_DIR}/access.log combined
> 
> 
> 
> 
> *Apache error log entry:*
> [Mon Mar 14 23:58:48.413099 2016] [authz_core:error] [pid 8034:tid 
> 140480713053952] [client 54.188.195.80:57782] AH01630: client denied by 
> server configuration: /home/user/kb_venv/project_name/

Perhaps you need to allow access to that directory?  Maybe something
like this:


  Require all granted


-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20160315223946.GZ16655%40fattuba.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deploying Django via wsgi

2016-03-15 Thread Avraham Serour
unless you are strictly required to use apache I strongly suggest using
nginx and uwsgi to deploy your django application


On Tue, Mar 15, 2016 at 6:01 AM,  wrote:

> Quite new, and trying to deploy first Django site. I keep getting 503
> errors. Here are the particulars, any hints as to what I'm doing wrong
> would be much appreciated! All directories and files are group owned and
> writable by www-data. Ubuntu server, and Apache2.4 server where I have root
> access. The tutorial where I got the howto is located here:
>
> https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04
>
> Thank you!
>
> *File structure/location:*
>
> /home/user/kb_venv/project_name/
> __init__.py
> settings.py
> urls.py
> wsgi.py
> manage.py
> app_name
>
> /home/user/kb_venv/project_name/project_name/
> apache/
> __init__.py
> override.py
> wsgi.py
>
>
> *override.py file contents:*
> from project_name.settings import
> DEBUG = True
> #ALLOWED_HOSTS = ['104.131.154.99'] (no domain name, I'm using IP to
> access the site)
>
> *wsgi.py file contents:*
> #wsgi.py
> import os, sys
> # Calculate the path based on the location of the WSGI script.
> apache_configuration= os.path.dirname(__file__)
> project = os.path.dirname(apache_configuration)
> workspace = os.path.dirname(project)
> sys.path.append(workspace)
> sys.path.append(project)
>
> # Add the path to 3rd party django application and to django itself.
> sys.path.append('/home/smlake/kb_venv')
> os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.apache.override'
> from django.core.wsgi import get_wsgi_application
> application = get_wsgi_application()
>
> *Apache2.4 000-default file:*
> 
>
> WSGIScriptAlias / /home/smlake/kb_venv/project_name/apache/wsgi.py
> 
>   Require all granted
> 
> ServerAdmin parallaxpl...@gmail.com
> DocumentRoot /home/smlake/kb_venv/project_name/project_name
>
> ErrorLog ${APACHE_LOG_DIR}/error.log
> CustomLog ${APACHE_LOG_DIR}/access.log combined
>
> 
>
>
> *Apache error log entry:*
> [Mon Mar 14 23:58:48.413099 2016] [authz_core:error] [pid 8034:tid
> 140480713053952] [client 54.188.195.80:57782] AH01630: client denied by
> server configuration: /home/user/kb_venv/project_name/
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6f6de168-acd2-4d81-8f5e-9e56643878ca%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFWa6tK5GRGGKeWkB7Ei51_jrvXGEV%2Bs4omzrLsdJGNfPNUWdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Deploying Django via wsgi

2016-03-15 Thread parallaxplace
Quite new, and trying to deploy first Django site. I keep getting 503 
errors. Here are the particulars, any hints as to what I'm doing wrong 
would be much appreciated! All directories and files are group owned and 
writable by www-data. Ubuntu server, and Apache2.4 server where I have root 
access. The tutorial where I got the howto is located here:
https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-14-04

Thank you!

*File structure/location:*

/home/user/kb_venv/project_name/
__init__.py
settings.py
urls.py
wsgi.py
manage.py
app_name

/home/user/kb_venv/project_name/project_name/
apache/
__init__.py
override.py
wsgi.py


*override.py file contents:*
from project_name.settings import
DEBUG = True
#ALLOWED_HOSTS = ['104.131.154.99'] (no domain name, I'm using IP to access 
the site)

*wsgi.py file contents:*
#wsgi.py
import os, sys
# Calculate the path based on the location of the WSGI script.
apache_configuration= os.path.dirname(__file__)
project = os.path.dirname(apache_configuration)
workspace = os.path.dirname(project)
sys.path.append(workspace)
sys.path.append(project)

# Add the path to 3rd party django application and to django itself.
sys.path.append('/home/smlake/kb_venv')
os.environ['DJANGO_SETTINGS_MODULE'] = 'project_name.apache.override'
from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

*Apache2.4 000-default file:*


WSGIScriptAlias / /home/smlake/kb_venv/project_name/apache/wsgi.py

  Require all granted

ServerAdmin parallaxpl...@gmail.com
DocumentRoot /home/smlake/kb_venv/project_name/project_name

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined




*Apache error log entry:*
[Mon Mar 14 23:58:48.413099 2016] [authz_core:error] [pid 8034:tid 
140480713053952] [client 54.188.195.80:57782] AH01630: client denied by 
server configuration: /home/user/kb_venv/project_name/




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f6de168-acd2-4d81-8f5e-9e56643878ca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.