> On 27 Mar 2018, at 9:09 am, Eric Sears <[email protected]> wrote:
>
> Good evening,
>
> Hopefully this all makes sense below, and any help would be greatly
> appreciated as I've been tearing my hair out trying to get this fixed.
>
> OS: RHEL 6.9
> One physical machine, two IPs
> first site:192.168.1.2
> second site: 192.168.1.3
>
> Working configuration:
>
> Python 2.7 is alt-installed into /usr/local. There is no venv on the system.
>
> 2 django sites which are duplicates. One is production and one is development
> and are hosted on the same physical box. The current sites are running with
> Apache 2.2.15 and mod_wsgi 4.5.2 (I believe).
If you are using 4.5.2, that is very old. The latest is 4.6.3. Sure you didn't
mean 4.6.2?
> There are two separate instances of Apache running with separate
> configuration files / module directories / etc. Both of these sites are
> running as expected with Apache 2.2. Lets say these sites are installed into:
>
> - /var/www/html/sitea/
> - /var/www/html/siteb/
>
> The wsgi.py and settings.py are both in /var/www/html/site(a|b)/project_name/
> directory.
>
> Using httpd24 in the RHEL SCL library, I have an install in
> /opt/rh/httpd24/root/etc/httpd. Copying over the working configuration from
> Apache 2.2 to 2.4 does not work. I've made the necessary changes of the
> config files with regards to permissions, etc (require all granted) as
> necessary. I've copied over the directory tree structure and am using:
Are you saying you copied over the complete Apache configuration from 2.2 and
tried using it in 2.4, or just the mod_wsgi and VirtualHost configuration?
>
> I've compiled a mod_wsgi (latest version) using the --with-apxs to reference
> the RH SCL apxs and also point it to the python install at /usr/local/lib.
Is your alternate Python 2.7 installation the only Python 2.7 installation on
the system? Is system Python still Python 2.6?
> - /opt/rh/httpd24/root/var/www/html/sitea
> - /opt/rh/httpd24/root/var/www/html/siteb
>
> As above, the wsgi.py and settings.py are in
> /opt/rh/httpd24/root/var/www/html/site(a|b)/project_name
>
> So far, I've just tried testing by working with siteb as sitea is
> operational. I've verified the wsgi portion is working correctly as i can run
> a manage.py runserver and access the site correctly. However, linking it into
> Apache2.4 is not working.
>
> Not having direct access to the machine right now. The settings are below:
>
> WSGIScriptAlias / /opt/rh/httpd24/root/var/www/html/sitea/project_name/wsgi.py
> WSGIDaemonProcess projectname
> python-home=/opt/rh/httpd24/root/var/www/html/sitea
> WSGIProcessGroup projectname
Are you modifying sys.path in the WSGI script file so Python will know where
your project code is?
> The settings are identical for both sites, with the difference being the
> sitea or siteb portion.
>
> These both are running in SSL (which is verified to be working) under a
> virtualhost in apache.
>
> I receive an error referencing truncated headers. I've tried setting the
> %{GLOBAL} option,
Do you mean using:
WSGIApplicationGroup %{GLOBAL}
It is preferable you use that regardless.
> but have no had any luck in getting it to work. I'm sure I'm just missing
> something small, but I'm not sure what it is.
>
> Thanks for any help!
> WSGI
Can you ensure you have set:
LogLevel info
in Apache configuration.
This will cause mod_wsgi to log more about process restarts, script loading
etc. I need to see the more detailed logging from the log file around time the
request was made. If you are using VirtualHost specific log, also need to see
any errors from main Apache error log at the same time.
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].
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.