-
Notifications
You must be signed in to change notification settings - Fork 272
mod_wsgi in python 3.6 and apache 2.4 in xampp 3.2.2 in Windows 8.1 #189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
As the error message says, set the
How you set it will depend on the shell you use. Use forward slashes, not backwards slashes. |
Hi @GrahamDumpleton, thanks for your prompt reply. I have tried this. The installation of mod_wsgi was successfull. But when I try to start the server by, it doesn't allow me. Following is the text from command prompt:
|
On Windows |
Yes but for that I'll need the mod_wsgi.so file. I am not able to find that for the python version I am using. Please tell where can I find the |
Run:
That command tells you what to put in the Apache configuration file See section 'Connecting into Apache installation' in: |
Thanks @GrahamDumpleton, that worked. I have deployed the server on Apache. But, there is one more problem. I am able to access the Django app from my own machine only. If I try opening the django app from another machine on the LAN, the request gets timed out and the page never loads. Please suggest what may be causing this problem. |
Hi @GrahamDumpleton. I somehow figured out that Firewall was the problem. It was blocking the ports. Thanks a lot for your help. |
Hi! @GrahamDumpleton. http://localhost/Hello/index.py --- index.py --- is ok! but: --- index.py Server error! ---- apache log --- cmd module config I don't want #!C:\Python\Python36-32\python.exe in first line index.py can u help me! |
@dungneo Please don't ask a new question in a comment to an existing issue. Create a new issue and I will deal with it there. |
@dungneo Since you haven't gone on to create a separate question, what I will say is that it appears you haven't actually configure mod_wsgi to say what your WSGI application is. Eg. using |
Tks @GrahamDumpleton! but i don't want shebang in shebang #!C:\Python\Python36-32\python.exe in first line in index.py to run! |
Are you sure you mean .htaccess file? When you ran:
did you actually copy the output of that into your Apache configuration file. You can't just run it alone as it does not modify the Apache configuration file for you. If you didn't add it, then You don't show the error you get when Apache can't start to confirm what you are doing wrong. |
Tks! |
Am not asking to see the output. Did you add:
into your main Apache configuration file? If you do not do that then mod_wsgi will not be loaded and use of |
Tks! @GrahamDumpleton !!! LoadFile "C:/Python/Python36-32/python36.dll" |
index.py in error.log |
You need to add:
into the Apache configuration file at a location which is before any place where you use the mod_wsgi directives. You have added it after the |
Tks! <VirtualHost 127.0.0.1:80> in error.log *.py need shebang!!!?! |
Have you added back the Remove any line which says:
as you don't want it and it will cause problems. Alternatively use a |
In error.log mod_wsgi (pid=10972): Target WSGI script 'C:/Python/Web/Hello/index.wsgi' does not contain WSGI application 'application'. tks! |
Your script file likely then isn't a WSGI application. The mod_wsgi package is not for running CGI scripts. Use the sample WSGI application of:
If that works, then go learn about WSGI applications. Preferably go use a framework such as Flask rather than trying to implement WSGI applications from scratch. |
Tks! @GrahamDumpleton so much! Hello/index.wsgi >>> Hello World! Do you have skype?! i want ask u about python!?! |
Sorry, I can't work with you one on one. If you have questions about Python, trying using StackOverflow or find a local Python user group which you can join. |
ok tks u! i wan to know best of server for python code: what u choose?!?! |
You really should focus on getting your WSGI application working first. Implement your WSGI application properly and it should be portable and able to run on any WSGI server. So get your application running and worry about choice of WSGI server later. |
ok! tks @GrahamDumpleton so much! |
I had issues with installed different python versions on my Windows 2012 server with apache.
|
@GrahamDumpleton i am trying to install mod_wsgi module in Windows 10, but I am getting following error: Traceback (most recent call last): I am using apache 2.4 bundled in xampp 3.2.2. |
Please don't ask question as a comment on existing issues, especially closed issues. Create a new issue. |
Please don't ask new questions on existing issues, especially one which is closed. I will say though I don't think you will be able to do it. The problem is that Python 2.5 requires a really old MS C/C++ compiler, and it is going to be incompatible with the compiler version Apache 2.4 uses. |
I am trying to install mod_wsgi module in Windows 8.1, but I am getting following error:
Traceback (most recent call last):
File "setup.py", line 157, in
raise RuntimeError('No Apache installation can be found. Set the 'RuntimeError: No Apache installation can be found. Set the MOD_WSGI_APACHE_ROOTDIR environment to its location.'
I am using apache 2.4 bundled in xampp 3.2.2.
The location of apache instalation folder is "C:\xampp\apache"
The text was updated successfully, but these errors were encountered: