Hello!

I have been stuck on this for many days.  I have a successful local django 
app which I can access the URL's as I expect to when I run django's dev 
server.  I pushed all the code to the server, and can still run the django 
dev server successfully and curl the appropriate URL's, and receive the 
HTML response I expect.

However, when I try to curl the ip/port combo I opened up with apache, I 
can connect, however I get a 404 on the URL (that should succeed), curl -v 
http://127.0.0.1:8090/login/ for instance.

foobar@foobar:/etc/apache2/sites-available$ curl -v 
http://127.0.0.1:8090/login/

* Hostname was NOT found in DNS cache

*   Trying 127.0.0.1...

* Connected to 127.0.0.1 (127.0.0.1) port 8090 (#0)

> GET /login/ HTTP/1.1

> User-Agent: curl/7.35.0

> Host: 127.0.0.1:8090

> Accept: */*

> 

< HTTP/1.1 404 Not Found

< Date: Wed, 18 Oct 2017 16:58:57 GMT

* Server Apache/2.4.7 (Ubuntu) is not blacklisted

< Server: Apache/2.4.7 (Ubuntu)

< Content-Length: 280

< Content-Type: text/html; charset=iso-8859-1

< 

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>404 Not Found</title>

</head><body>

<h1>Not Found</h1>

<p>The requested URL /login/ was not found on this server.</p>

<hr>

<address>Apache/2.4.7 (Ubuntu) Server at 127.0.0.1 Port 8090</address>

</body></html>

* Connection #0 to host 127.0.0.1 left intact

When I check the apache logs (after I turned on info level of detail) I see 
it is looking for this path incorrectly (instead of allowing django to do 
it's thing and redirect to the actual login.html which resides within the 
django project.

AH00128: File does not exist: /var/www/login/


I was able to host a static html file with this current apache setup, I can 
get django to work on it's dev server, but the connection between the two 
is faulty.  Here is my current setup:

wsgi.py


import os
from django.core.wsgi import get_wsgi_application

os.environ.setdefault("DJANGO_SETTINGS_MODULE", "avails.settings")
application = get_wsgi_application()


avails.conf (within sites-available, sites-enabled)

<VirtualHost *:8090>

    ServerAdmin foo...@foobar.com

    ServerName avails

    ServerAlias foobar

    ErrorLog ${APACHE_LOG_DIR}/error.log

    CustomLog ${APACHE_LOG_DIR}/access.log combined


    WSGIScriptAlias /avails /var/www/BI-WebApp/avails/avails/wsgi.py

    WSGIProcessGroup avails

    WSGIDaemonProcess avails python-home=/usr 
python-path=/var/www/BI-WebApp/avails/xmlgen


    <Directory /var/www/BI-WebApp/avails/avails>

    <Files wsgi.py>

    Require all granted

    </Files>

    </Directory>


    <Directory /var/www/BI-WebApp/avails>

    Require all granted

    </Directory>


    LogLevel info


</VirtualHost>


Any point in some sort of direction would be supreme!

Thanks in advance,
Josh

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to modwsgi+unsubscr...@googlegroups.com.
To post to this group, send email to modwsgi@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to