You need to add the path to the Python executable, which ought to be in your virtual environment for your project.
As for the differences between 2.7 and 3.6, I suggest trying to run your code in 3.6 to see if you actually need to make any changes. They aren’t that different from each other. The biggest habit I had to change was to use print as a function, basically surrounding the print string in parentheses. From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of sarfaraz ahmed Sent: Monday, May 8, 2017 9:13 AM To: django-users@googlegroups.com Subject: Re: Django Deployment showing list of directory I am new to python 2.7 and I see python 3.6 is very different from 2.7. I tried your suggestion. Now my vhost file looks like this WSGIScriptAlias / c:/Apache24/htdocs/testarhamcollections/project1/wsgi.py WSGIPythonPath c:/Apache24/htdocs/testarhamcollections <VirtualHost *:80> ServerAdmin ad...@testarhamcollections.com<mailto:ad...@testarhamcollections.com> DocumentRoot "C:/Apache24/htdocs/testarhamcollections" ServerName www.testarhamcollections.com<http://www.testarhamcollections.com> ServerAlias testarhamcollections.com<http://testarhamcollections.com> ErrorLog "C:/Apache24/htdocs/testarhamcollections/logs/testarhamcollections.com-error.log" CustomLog "C:/Apache24/htdocs/testarhamcollections/logs/testarhamcollections.com-access.log" common Alias / "c:/Apache24/htdocs/testarhamcollections" <Files wsgi.py> Require all granted </Files> </VirtualHost> -------------------------- Still not working On 8 May 2017 at 18:58, Matthew Pava <matthew.p...@iss.com<mailto:matthew.p...@iss.com>> wrote: Ah, I see. Well, why don’t you upgrade to Python 3.6? I did that last year and haven’t looked back. To answer your other question, you need to specify WSGIPythonPath outside of your VirtualHost directive in your Apache config. WSGIPythonPath ${project_path};${project_virtualenv}; From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> [mailto:django-users@googlegroups.com<mailto:django-users@googlegroups.com>] On Behalf Of sarfaraz ahmed Sent: Monday, May 8, 2017 8:21 AM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: Re: Django Deployment showing list of directory forgot to mention I m using python 2.7. If you look at link, there is not mod_wsgi for python 2.7 with VC14 Regards, Sarfaraz Ahmed On 8 May 2017 at 18:44, Matthew Pava <matthew.p...@iss.com<mailto:matthew.p...@iss.com>> wrote: Hi Sarfaraz, Here is a compiled version of mod_wsgi for VC14: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi From: django-users@googlegroups.com<mailto:django-users@googlegroups.com> [mailto:django-users@googlegroups.com<mailto:django-users@googlegroups.com>] On Behalf Of sarfaraz ahmed Sent: Monday, May 8, 2017 5:09 AM To: django-users@googlegroups.com<mailto:django-users@googlegroups.com> Subject: Django Deployment showing list of directory Hello Guys, After lot of struggle I understood there is no MOD_WSGI file available for latest version of XAMP which is compiled in VC14. I am not sure how to compile MOD_WSGI with VC 14 so I gave up Now I downloaded Apache 2.4 compiled in VC9 + Python 2.7.13 on my windows server 2016(AWS instance) I moved my website to this server. Changed firewall setting to accepting incoming traffic and also networking configuration. Now I am seeing the list of directory and files instead of website. Here is my wsgi.py file ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- import os import sys from django.core.wsgi import get_wsgi_application sys.path.append('C:\Apache24\htdocs\testarhamcollections\') os.environ.setdefault("DJANGO_SETTINGS_MODULE", "project1.settings") application = get_wsgi_application() --------------------------------------------------------------------------------------------------------------------------------------------------------------------- This is conf file for Apache ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- <VirtualHost *:80> ServerAdmin ad...@testarhamcollections.com<mailto:ad...@testarhamcollections.com> DocumentRoot "C:/Apache24/htdocs/testarhamcollections" ServerName www.testarhamcollections.com<http://www.testarhamcollections.com> ServerAlias testarhamcollections.com<http://testarhamcollections.com> ErrorLog "C:/Apache24/htdocs/testarhamcollections/logs/testarhamcollections.com-error.log" CustomLog "C:/Apache24/htdocs/testarhamcollections/logs/testarhamcollections.com-access.log" common WSGIScriptAlias / "c:/Apache24/htdocs/testarhamcollections/project1/wsgi.py" Alias / "c:/Apache24/htdocs/testarhamcollections" Alias /static/ "c:/Apache24/htdocs/testarhamcollections/static/" Alias /media/ "c:/Apache24/htdocs/testarhamcollections/static/media/" <Directory c:/Apache24/htdocs/testarhamcollections/project1> <Files wsgi.py> Require all granted </Files> </Directory> </VirtualHost> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- I checked the error log of website it shows nothing. -- Thanks with regards, Sarfaraz Ahmed -- 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<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto: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/CAEPJdixr3x3f3v9Kyw%3DtxKZP4wX9i0ZckEsYhaBxmbFzbJ1aEg%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAEPJdixr3x3f3v9Kyw%3DtxKZP4wX9i0ZckEsYhaBxmbFzbJ1aEg%40mail.gmail.com?utm_medium=email&utm_source=footer>. 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<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto: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/cc4fe8b57f3c4858bdc8f54adb245e0e%40ISS1.ISS.LOCAL<https://groups.google.com/d/msgid/django-users/cc4fe8b57f3c4858bdc8f54adb245e0e%40ISS1.ISS.LOCAL?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Thanks with regards, Sarfaraz Ahmed -- 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<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto: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/CAEPJdixPjpsy0gsgmHP71%2BQo3ABD-%2B7PNUaYfGkEgCVEB7GHEw%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAEPJdixPjpsy0gsgmHP71%2BQo3ABD-%2B7PNUaYfGkEgCVEB7GHEw%40mail.gmail.com?utm_medium=email&utm_source=footer>. 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<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto: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/f7f8ce5cbda74cc28f3d466b48b9c884%40ISS1.ISS.LOCAL<https://groups.google.com/d/msgid/django-users/f7f8ce5cbda74cc28f3d466b48b9c884%40ISS1.ISS.LOCAL?utm_medium=email&utm_source=footer>. For more options, visit https://groups.google.com/d/optout. -- Thanks with regards, Sarfaraz Ahmed -- 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<mailto:django-users+unsubscr...@googlegroups.com>. To post to this group, send email to django-users@googlegroups.com<mailto: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/CAEPJdiyP5Qz9JSEFsRqc4tFMdqahn0bQAGR-wJhFmWMR-aSLGg%40mail.gmail.com<https://groups.google.com/d/msgid/django-users/CAEPJdiyP5Qz9JSEFsRqc4tFMdqahn0bQAGR-wJhFmWMR-aSLGg%40mail.gmail.com?utm_medium=email&utm_source=footer>. 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/f0031e50835040ac98afd555e12767dd%40ISS1.ISS.LOCAL. For more options, visit https://groups.google.com/d/optout.