>
> Do they at least provide a way of inserting extra configuration inside of
> the generated VirtualHost definition?
> If you can’t replace the existing WSGIDaemonProcess definition, then you
> could create a new WSGIDaemonProcess definition with different name and
> configuration and then set WSGIProcessGroup to override existing delegation
> to use it instead. It means there will be a redundant process there, but
> the WSGI application will never be loaded in it, so memory used would be
> minimal.
>
The only way to insert additional configuration to the VirtualHost
definition is to overwrite the file completely, basically sending the same
file with different content into the exact same directy, this is how I
managed to change from mpm_prefork to mpm_event, although it is another
file that the only content is the mpm configuration so it was quite simply
to overwrite. For the wsgi file, it is a bit more difficult since it
contains a lot of configuration settings where some of them are populated
automatically from the provided amazon config file and the auto deploy
process
Since you appear to have some level of root access to install new system
> packages, the only other option would be to install https-dev. Compile
> mod_wsgi from source code. Uninstall system mod_wsgi package and then
> install mod_wsgi module you compiled yourself such that newer mod_wsgi.so
> is in Apache modules directory at the same location as what there generate
> Apache configuration looks for it.
> Even then, if this is due to the Apache version, that is still not going
> to help.
> BTW, what Apache and mod_wsgi versions does your development environment
> use?
>
Development and production use the exact environment, the only different is
that production is deployed behind a load balancer, but they are the exact
same machine setup through amazon elastic beanstalk deploy, so all versions
match, of pretty much everything.
I believe it is possible to install any additional package as long as it
can be installed through 'yum install xxx' and it is available given
ubuntu/aws repository, I don't know exactly where the packages from when
installed that way but I have had cases where some packages weren't
available. For next step, uninstall mod_wsgi and re compile a new version,
I don't think that can be easily done.
Basically you are given a config file that can contain a list of sequential
commands executed from the root directory of your app, plus a few kew/value
settings that are added automatically to the wsgi.conf file (like the
WSGIDaemonProcess process and thread values)
There is possibly another easier way to trick it into using your own
> VirtualHost definition which then allows you to take complete control as to
> how to set up the site, although ordering is important.
> How does it include the conf file including the VirtualHost definition for
> your WSGI application?
> I recollect you saying something like it includes all conf files in a
> certain directory. Thus something like:
>
> Include sites/*.conf
>
> Can you find what what it uses to include that file, and also show me the
> complete conf file it generates again.
>
I believe what you say about using my own VirtualHost definition would be
the same as above, simply send my own version of the wsgi.conf file (which
amazon uses to set the virtual host and all wsgi settings) overwriting the
existing one but I'm not 100% sure it can work since I don't know how
amazon generates that file from my conf file, the order can be that it is
created after all my commands have run, so my attempt to overwrite it might
fail.
The amazon httpd.conf file indeed uses:
Include conf.modules.d/*.conf and
IncludeOptional conf.d/*.conf
The complete wsgi.conf file looks like this:
> LoadModule wsgi_module modules/mod_wsgi.so
> WSGIPythonHome /opt/python/run/baselinenv
> WSGISocketPrefix run/wsgi
> WSGIRestrictEmbedded On
>
> <VirtualHost *:80>
>
> Alias /static/ /opt/python/current/app/static/
> <Directory /opt/python/current/app/static/>
> Order allow,deny
> Allow from all
> </Directory>
>
>
> WSGIScriptAlias / /opt/python/current/app/central/wsgi.py
>
>
> <Directory /opt/python/current/app/>
> Require all granted
> </Directory>
>
> WSGIDaemonProcess wsgi processes=1 threads=10 display-name=%{GROUP} \
>
> python-path=/opt/python/current/app:/opt/python/run/venv/lib64/python2.7/site-packages:/opt/python/run/venv/lib/python2.7/site-packages
>
> user=wsgi group=wsgi \
> home=/opt/python/current/app
> WSGIProcessGroup wsgi
> </VirtualHost>
>
> LogFormat "%h (%{X-Forwarded-For}i) %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\"" combined
>
--
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.