Temporarily, web2py is using http service and https by PHP site by
modifying httpd.conf file but any permanent solution ?
What needs to control the root page of the web server, a PHP script or
web2py?
Can the PHP stuff be placed under a common sub URL rather than .php
files sprinkled directly under '/'?
If web2py controls root page and PHP stuff under a common sub URL then
is easy.
If .php is sprinkled in DocumentRoot and should take precedence over
web2py when such files exist, then a little bit tricker to configure,
but still possible.
The information you need is in:
http://code.google.com/p/modwsgi/wiki/ConfigurationGuidelines
so long as you know what to look for and how to apply it. ;-)
BTW, do make absolutely sure web2py running in mod_wsgi daemon mode.
PHP enforces Apache be setup in a particular way which is detrimental
to Python web applications if they are run in embedded mode. Have a
read of:
http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html
Graham
--
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
On Jan 20, 5:28 pm, Alexandre Andrade <alexandrema...@gmail.com>
wrote:
> I think is not a good idea.
>
> php requires apache2-prefork (single-thread)
> wsgi works with apache2-mpm (multi-thread)
>
> So, they are incompatible.
>
> 2010/1/20 vvk <varunk.ap...@gmail.com>
>
>
>
>
>
> > I installed web2py with apache & mod_wsgi. My computer don't have any
> > Domain Name. Another PHP project should be hosted on same machine. How
> > to configure my system to run PHP and web2py at the same time?
>
> > Temporarily, web2py is using http service and https by PHP site by
> > modifying httpd.conf file but any permanent solution ?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > web2py+un...@googlegroups.com<web2py%2Bunsu...@googlegroups.com>
http://markmail.org/message/5cgsibkoohxfh6pl
seems to say that is not a problem (although they experienced other
problems).
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
On Jan 20, 11:28 pm, Alexandre Andrade <alexandrema...@gmail.com>
wrote:
> I think is not a good idea.
>
> php requires apache2-prefork (single-thread)
> wsgi works with apache2-mpm (multi-thread)
>
> So, they are incompatible.
Nonsense.
There is no such thing as apache2-mpm so assume you mean worker MPM.
Even so, Apache/mod_wsgi works with either worker or prefork MPM on
UNIX systems and also works on some of the experimental Apache MPMs as
well.
So, you DO NOT need to use worker MPM to use mod_wsgi.
That said and as explained in:
http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html
If using prefork MPM, you are well advised to run the Python web
application in mod_wsgi daemon mode where you can control both number
of processes and threads for the Python web application.
Also read:
http://code.google.com/p/modwsgi/wiki/ProcessesAndThreading
where you will find an explanation of the various MPMs of Apache plus
daemon mode and what it means to run a Python web application in each.
That all said, there is one restriction on daemon mode and that is
that it isn't available when using Apache 1.3 and is only available
from Apache 2.0 onwards. This is because Apache 1.3 doesn't use Apache
run time library and all the goodies in it that mod_wsgi uses to
implement daemon mode, plus core functionality of Apache which is
required also isn't present.
Graham
> 2010/1/20 vvk <varunk.ap...@gmail.com>
>
>
>
>
>
> > I installed web2py with apache & mod_wsgi. My computer don't have any
> > Domain Name. Another PHP project should be hosted on same machine. How
> > to configure my system to run PHP and web2py at the same time?
>
> > Temporarily, web2py is using http service and https by PHP site by
> > modifying httpd.conf file but any permanent solution ?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "web2py-users" group.
> > To post to this group, send email to web...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > web2py+un...@googlegroups.com<web2py%2Bunsu...@googlegroups.com>
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/web2py?hl=en.
http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usage.html
If Ubuntu only has PHP for prefork and only has mod_wsgi for worker
and enforces it, then you will need to compile mod_wsgi from source
code.
Technically same mod_wsgi.so should work for either prefork or worker
MPM, but Ubuntu package manager may not like you mixing it if it has
requirement on mod_wsgi that must have worker MPM.
Anyway, get Apache loading both then not a problem to do it using
separate virtual hosts like you intend.
Graham
On Jan 22, 12:10 am, Alexandre Andrade <alexandrema...@gmail.com>
wrote:
> well, thanks by explanation.
>
> :-)
>
> I think my confusion is because debian/ubuntu, at 'apt-get install
> libapache2-mod-wsgi', install by default apache2-worker.
>
> I tested installing libapache2-mod-php5 after mod-wsgi, (e change to
> apache2-prefork) and web2py still works
>
> The rest is the trick to configure both php and web2py sites. I think a good
> solution would be virtual hosts:
>
> www.mysite.com- > web2py
> other.mysite.com -> php (/var/www)
>
> I will test it later.
>
> 2010/1/20 Graham Dumpleton <graham.dumple...@gmail.com>
>
>
>
>
>
>
>
> > On Jan 20, 11:28 pm, Alexandre Andrade <alexandrema...@gmail.com>
> > wrote:
> > > I think is not a good idea.
>
> > > php requires apache2-prefork (single-thread)
> > > wsgi works with apache2-mpm (multi-thread)
>
> > > So, they are incompatible.
>
> > Nonsense.
>
> > There is no such thing as apache2-mpm so assume you mean worker MPM.
>
> > Even so, Apache/mod_wsgi works with either worker or prefork MPM on
> > UNIX systems and also works on some of the experimental Apache MPMs as
> > well.
>
> > So, you DO NOT need to use worker MPM to use mod_wsgi.
>
> > That said and as explained in:
>
> >http://blog.dscpl.com.au/2009/03/load-spikes-and-excessive-memory-usa...
> > <web2py%2Bunsu...@googlegroups.com<web2py%252Bunsubscribe@googlegroups. com>
To unsubscribe from this group, send email to web2py+un...@googlegroups.com.