I am using CentOS 6.8 which comes with Apache 2.2 and i was having trouble 
getting it to work with mod_wsgi that i decided to install mod_wsgi_httpd 
with mod_wsgi-express following the steps from the web. Anyway, the Apache 
instance from mod_httpd is of version 2.4 which i assume should be better. 

As i am not an expert on configuring httpd.conf, I use the mod_wsgi-express 
setup-server with parameters to generate the httpd.conf file and use the 
apachectl start to start the server. 

My python web app is working fine with this new setup.

I have just installed a chat server in the same machine. I just want to 
configure the Apache instance to act as a proxy to forward a HTTP 
connection to the chat server when the client connects to the Apache server 
with the url https://webserver.com/http-bind

I managed to get it to work by manually configuring the files in my 
previous post. I was just thinking if mod_wsgi_express can actually do the 
same thing by simply passing some parameters.

I will try the --proxy-mount-point option as you suggested to see if it 
does configure the httpd.conf to load the proxy modules and perform the 
proxy service.

I apologize if my explanation is not clear.

Thanks.

On Friday, October 7, 2016 at 7:47:31 PM UTC+8, Graham Dumpleton wrote:
>
> Rather than explain what you have done, can you explain what you want to 
> do?
>
> I can’t see any reason why you would want to do what it seems you are 
> trying to do.
>
> On 7 Oct 2016, at 10:37 PM, peter hoth <[email protected] <javascript:>> 
> wrote:
>
> Hi Graham,
>
> 1. I have disabled the Apache that comes with the system and i am using 
> the Apache instance installed with the mod_wsgi_httpd
>
>
> Is there are reason you aren’t using the system Apache?
>
> 2. I am currently using the Apache instance with the configuration 
> generated by the mod_wsgi-express and it is currently running.
>
>
> How are you running that? By running ‘mod_wsgi-express start-server’, or 
> by running ‘apachectl’ in generated configuration directory after having 
> used ‘mod_wsgi-express setup-server’.
>
> 3. I have installed a running XMPP server in the same machine and i have 
> manually configured the apachectl  and httpd files (both created by the 
> mod_wsgi_httpd and mod_wsgi-express and not the system Apache files)
>
>
> This bit doesn’t make sense. Why are you trying to use the Apache 
> configuration files generated by mod_wsgi-express with your XMPP Apache 
> instance? That is not the purpose of mod_wsgi-express, it is a self 
> contained system, it is not intended to be used to generate a configuration 
> for a separate Apache installation.
>
>    a. I manually appended "-DMOD_WSGI_WITH_PROXY" to the end of the line 
> "HTTPD_ARGS" in the apachectl file
>    b. I manually inserted the lines to the mod_wsgi-express generated file 
> httpd.conf 
>          :
>          ProxyPass /http-bind/ http://localhost:5280/http-bind/
>          ProxyPassReverse /http-bind/ http://localhost:5280/http-bind/
>          :
>
>
> If there was a valid reason to have mod_wsgi-express proxy some sub URL to 
> a backend site, you would use the option:
>
>     --proxy-mount-point /http-bind http://localhost:5280/http-bind/
>
> when running mod_wsgi-express.
>
> 4. I am wondering if based on the required changes, is it possible that I 
> use mod_wsgi-express to make the changes for me by simply passing 
> parameters to it. 
>
>
> Please go back and explain what you are wanting to do, rather than 
> describe what you think is the solution. Do you actually have a Python web 
> application you want to run?
>
> Graham
>
> Thanks.
>
> On Friday, October 7, 2016 at 5:15:51 PM UTC+8, Graham Dumpleton wrote:
>>
>>
>> On 7 Oct 2016, at 7:59 PM, peter hoth <[email protected]> wrote:
>>
>> Hi,
>>
>> I managed to install both mod_wsgi-express and mod_wsgi_httpd and get my 
>> site working by calling mod_wsgi-express with the standard parameters to 
>> generate the httpd.conf file.
>>
>>
>> Be aware that there is no need to use the mod_wsgi-httpd package if you 
>> already have Apache httpd server installed as a system package, along with 
>> the appropriate Apache httpd dev packages for it. In other words, use the 
>> system Apache if you can, the pip installable mod_wsgi-httpd is only for if 
>> you have no other choice for getting Apache httpd server installed.
>>
>> Now, i have implemented a xmpp server and would like to incorporate it 
>> into my site. The requirements are that i need to install the proxy module 
>> and add the following lines to the apache config file.
>>
>> sudo a2enmod proxy
>> sudo a2enmod proxy_http
>>
>>
>> Add to apache config file:
>>
>> <VirtualHost *:443>
>>   ServerName mywebapp.com
>>   :
>>   ProxyPass /http-bind/ http://localhost:5280/http-bind/
>>   ProxyPassReverse /http-bind/ http://localhost:5280/http-bind/
>>   :
>> </VirtualHost>
>>
>>
>> In the generated httpd.conf file, i can see the following lines:
>>
>> :
>> <IfDefine MOD_WSGI_WITH_PROXY>
>> <IfModule !proxy_module>
>> LoadModule proxy_module ${MOD_WSGI_MODULES_DIRECTORY}/mod_proxy.so
>> </IfModule>
>> <IfModule !proxy_http_module>
>> LoadModule proxy_http_module ${MOD_WSGI_MODULES_DIRECTORY}/mod_proxy_http
>> .so
>> </IfModule>
>> </IfDefine>
>> :
>>
>> Q1. What parameters should i pass to mod_wsgi-express to get it to 
>> configure the httpd.conf to include the modules ?
>>
>> Q2. Can I use mod_wsgi-express to help me to add in the proxy lines or do 
>> i need to manually go through the <IfDefine> lines in the generated 
>> httpd.conf to see where to add in the lines ?
>>
>>
>> It isn’t clear as to which Apache instance you want to be the front 
>> facing site, the system Apache or the one used by mod_wsgi-express. Also be 
>> aware that the mod_wsgi-express generated Apache configuration has got 
>> nothing to do with the system Apache installation. Nothing you do with 
>> mod_wsgi-express will change the system Apache installation setup. The 
>> mod_wsgi-express instance of Apache runs entirely separately.
>>
>> So can you clarify what is running in the system Apache and do you want 
>> the system Apache to be the front end Apache which then proxies only 
>> specific requests through to mod_wsgi-express? Or do you want 
>> mod_wsgi-express to be the front end Apache instance, with it proxying to 
>> the system Apache? That you are talking about proxy setups in both is a bit 
>> confusing.
>>
>> If you do have something significant running on the system Apache, you 
>> may be better off just loading mod_wsgi into the system Apache, configuring 
>> mod_wsgi manually, and not use mod_wsgi-express.
>>
>> Graham
>>
>
> -- 
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected] <javascript:>
> .
> Visit this group at https://groups.google.com/group/modwsgi.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to