Thank you. I got Hello World to work. My problem for getting the Hello World 
app to work was simply the domain name and now that I know that I understand 
why. In order to use a virtual host, you need something to tell the server to 
use the virtual host and an IP address is insuffcient for that.

(So, beside the point, but does mod_wsgi not work at all without a domain name? 
I suppose there are other ways to direct to a virtual host, but I don't know 
how off the top of my head. Anyway, this is beside the point. I just used a 
domain name and Hello World worked.)

I develop on my own, so I really really really try to keep my stuff STANARD 
once it's outside the scope of what I know. I didn't tell you my configuration 
because
1. all I have to say about it is "normal and standard."
2. because I assume you're too busy to fix my problem for me.

That said, you can SSH in see my configuration for yourself:
IP: 23.254.144.125
user: graham
password: modwsgicreator

I don't know of a better way to show you my configuration. You can see where I 
renamed the apache2.conf file that works for the Hello World app and then I 
made a quick attempt at substituting in my app called tlom. tlom doesn't work, 
but you can see my goal I think.

Nathan Ruffing
+1-614-205-1285

----- Original message -----
From: Graham Dumpleton <graham.dumple...@gmail.com>
To: Nathan Ruffing <n...@rr34.us>
Cc: modwsgi@googlegroups.com
Subject: Re: [modwsgi] Quick Configuration Guide
Date: Sunday, December 15, 2024 18:38


Yes you require Apache as mod_wsgi is an embedded module specifically for the 
Apache httpd server. You either manually integrate it into the system Apache 
installation, or you can use pip install method and use mod_wsgi-express to 
also run a standalone instance, although when I say standalone you are still 
using the system Apache installation, just that mod_wsgi-express generates a 
standalone configuration for you and runs the server instance on a separate 
port to the system Apache instance.

A .wsgi extension is used in docs rather than .py purely because some Apache 
installations include default configuration which maps .py extensions to CGI 
handler in Apache thus conflicting with mod_wsgi if you use .py. So the code is 
still Python, but .wsgi is shown in examples to avoid that conflict. You can 
use .py if you want, but you must make sure you modify the Apache configuration 
necessary so that .py extension is not handled as a CGI script. Because distros 
are different, you would need to work out how to disable the default CGI 
configuration if present.

Anyway as I said before, unless you explain what configuration you used, where 
you placed it, what distro you are using and what manual steps if any you took 
to enable stuff in Apache I can’t really help with your original problem easily 
and can only guess.

Most of the time for what you describe problem is:

1. Apache was not restarted or forced to reload configuration after changes.
2. Configuration was added to a new separate VirtualHost but you set ServerName 
to an IP address, which will not work and instead Apache falls back to using 
default VirtualHost.
3. You do have proper FQDN and set ServerName to it, but did not enable the 
site where Linux distro requires it.

There can be otger reasons though and without knowing what exactly you have 
done so far I can help.

> On 16 Dec 2024, at 6:28 AM, Nathan Ruffing <n...@rr34.us> wrote:
> 
> "A very simple WSGI application, and the one which should be used for the 
> examples in this document, is as follows:"
> 
> That excerpt from the guide really highlights my confusion. Why would I make 
> a WSGI application? I have a Flask application and I didn't think WSGI was 
> for making applications. I thought WSGI was for serving existing applications.
> 
> Nathan Ruffing
> +1-614-205-1285
> 
> ----- Original message -----
> From: Nathan Ruffing <n...@rr34.us>
> To: Graham Dumpleton <graham.dumple...@gmail.com>, modwsgi@googlegroups.com
> Subject: Re: [modwsgi] Quick Configuration Guide
> Date: Sunday, December 15, 2024 16:03
> 
> Is a server required AT ALL? Does the WSGI stand alone as a server without 
> Apache or nginx?
> 
> Is mod_WSGI a server? Or does it act as a go-between between the app and the 
> server?I keep reading and watching videos and the answer to that question 
> doesn't seem clear.
> 
> Nathan Ruffing
> +1-614-205-1285
> 
> ----- Original message -----
> From: Nathan Ruffing <n...@rr34.us>
> To: Graham Dumpleton <graham.dumple...@gmail.com>, modwsgi@googlegroups.com
> Subject: Re: [modwsgi] Quick Configuration Guide
> Date: Sunday, December 15, 2024 15:55
> 
> I really appreciate the response. Maybe the answer to this question would 
> tell me what I need to know.
> 
> https://www.modwsgi.org/en/develop/user-guides/quick-configuration-guide.html
> 
> If I get that simple Hello World application working, then I want to replace 
> the Hello World application with my application, where do my app files go?? 
> Do I put all the files there in the recommended directory and rename my 
> 'main.py' file 'main.wsgi'?
> 
> What is .wsgi? It looks like Python, so why isn't it .py like all the other 
> Python?
> 
> I'm sorry I really don't ask questions that much. Most answers are already 
> available and I'm sure mine is too, but in this case I don't really even know 
> *which question is my question *if that makes sense.
> 
> Nathan Ruffing
> +1-614-205-1285
> 
> ----- Original message -----
> From: Graham Dumpleton <graham.dumple...@gmail.com>
> To: modwsgi@googlegroups.com
> Subject: Re: [modwsgi] Quick Configuration Guide
> Date: Sunday, December 15, 2024 06:51
> 
> 
> I can’t really help you as you have not shown how you tried to configure 
> Apache. What mod_wsgi configuration have you used and where in the Apache 
> configuration did you put it? What other Linux distro specific steps did you 
> do to enable Apache and trigger it to restart or reload the configuration?
> 
> The reason the documentation doesn’t give exact steps is because how you need 
> to do things with Apache is different for different Linux distros. It isn’t 
> really practical to try and main docs for every Linux distro, macOS , Windows 
> and other Unix variants.So it is assumed you have checked the Apache 
> documentation for your operating system first to learn where you need to put 
> any configuration and what extra steps you may need to run to enable it 
> and/or restart Apache.
> 
> If you indicate what operating system you are using, what Apache package 
> distribution package is being used or how you otherwise installed Apache, and 
> how you tried to configure it then I may be able to guide you.
> 
>> On 15 Dec 2024, at 8:41 PM, Nathan Ruffing <n...@rr34.us> wrote:
>> 
>> I think I completed the quick configuration guide, but the result was the 
>> apache2 default page, not "Hello World." Sooo, am I incomplete or did I do 
>> something wrong?
>> 
>> Honestly I'm not really even sure I actually completed the quick 
>> configuraiton guide because it's not clear what it's saying TO DO and what 
>> the scope of the configuration guide is. I read along and I see the sample 
>> configuration text and I copy-pasted that into the apache2.conf file and 
>> replaced text per my situation, but does that mean I should see "Hello 
>> World"? OR do I have to do the typical apache2 a2ensite command still? Is 
>> the configuration everything or is there other poining and enabling to be 
>> done?
>> 
>> The word "mount" is not helpful because it's still not clear if WSGI is the 
>> application or points to the application, so does "mounted" mean complete or 
>> halfway complete? "Would be a good configuration" is also not helpful. "Do 
>> exactly this" is what I am looking for in a "guide."
>> 
>> It would be nice to have one specific, COMPLETE instruction on how to get 
>> the "Hello World" message, then AFTER THAT describe what the parts of WSGI 
>> are. Seems like the confusing descriptions come before anything works and 
>> I'm left here wondering what is even supposed to happen or how complete the 
>> guide is supposed to be. Did I complete the steps or not? I guess I should 
>> say the problem is: It's not clear whether I have completed the steps and 
>> should TROUBLESHOOT, or if I have not completed all the required steps and I 
>> should seek other steps I missed?
>> 
>> I appreciate what I think mod_wsgi is supposed to do, but the instructions 
>> are so confusing I can't even formulate a question.
>> 
>> Thanks,
>> 
>> 
>> --
>> 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 view this discussion visit 
>> https://groups.google.com/d/msgid/modwsgi/ed8928d3-3ff6-4dae-8382-e229fcca79b1n%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/modwsgi/ed8928d3-3ff6-4dae-8382-e229fcca79b1n%40googlegroups.com?utm_medium=email&utm_source=footer>.
> 
> 
> --
> 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 view this discussion visit 
> https://groups.google.com/d/msgid/modwsgi/D24C28A3-6E0E-4927-B373-3F518AF39279%40gmail.com
>  
> <https://groups.google.com/d/msgid/modwsgi/D24C28A3-6E0E-4927-B373-3F518AF39279%40gmail.com?utm_medium=email&utm_source=footer>.
> 
> 

-- 
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 view this discussion visit 
https://groups.google.com/d/msgid/modwsgi/cdc7dfe6-d432-4a97-8a7f-ba4ab3769ffc%40app.fastmail.com.

Reply via email to