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:*
> <VirtualHost *:80>
> 
>     WSGIScriptAlias / /home/smlake/kb_venv/project_name/apache/wsgi.py
>     <Directory "/home/smlake/kb_venv/kittybungalow/kittybungalow/apache/">
>           Require all granted
>     </Directory>
>     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
> 
> </VirtualHost>
> 
> 
> *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:

    <Directory "/home/user/kb_venv/project_name">
          Require all granted
    </Directory>

-- 
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.

Reply via email to