> On 6 Sep 2016, at 1:20 AM, [email protected] wrote: > > I am having an issue where when I have ErrorLog in my VirtualHost > configuration all I get is one line repeated a couple times that says > "AH00124: Request exceeded the limit of 10 internal redirects due to probable > configuration error." in my vhost error log but when I comment out ErrorLog > then I get the full traceback in the main log (repeated a lot more).
This error generally relates to broken mod_rewrite rules and nothing to do with mod_wsgi. How are mod_rewrite rules, or other Apache directives for redirection being used elsewhere in the Apache configuration? Also, are extended multi language error pages enabled in Apache? There are the ErrorDocument directives. Graham > I found this post > (https://groups.google.com/d/topic/modwsgi/n3c1LfNM1oQ/discussion) and I > started to try some of the debugging items. I put this in my wsgi script file: > > import sys > > print ('STDERR 1', file=sys.stderr) > > def application(environ, start_response): > > print ('STDERR 2', file=sys.stderr) > print ('WSGI 1', file=environ['wsgi.errors']) > > status = u'200 OK' > output = b'Hello World!' > > response_headers = [('Content-type', 'text/plain')] > start_response(status, response_headers) > > return [output] > > When I was running Apache 2.4.23 w/ mod_wsgi 4.5.3 it printed STDERR 1 & > STDERR 2 in my vhost log but no WSGI 1 then I upgraded to mod_wsgi 4.5.6 and > it only printed STDERR 1 to the vhost logs the other print statements did not > show anywhere. My expectation is that I should get all 3 print statements to > print somewhere (preferably all to the vhost log). > > Virtual host: > <VirtualHost 107.161.X.X:80> > ServerName fina.dev.harwoodspike.com > ServerAlias www.fina.dev.harwoodspike.com > DocumentRoot /home/devharwoodspike/fina.dev.harwoodspike.com > ServerAdmin [email protected] > UseCanonicalName Off > > WSGIDaemonProcess fina.dev.harwoodspike.com user=devharwoodspike > group=devharwoodspike processes=3 threads=3 > python-path=/home/devharwoodspike/python-apps/fina/:/home/devharwoodspike/python-apps/virtpython/lib/python3.5/site-packages/ > display-name=FINA-DEV This is better written as: WSGIDaemonProcess fina.dev.harwoodspike.com user=devharwoodspike group=devharwoodspike processes=3 threads=3 python-path=/home/devharwoodspike/python-apps/fina/ python-home=/home/devharwoodspike/python-apps/virtpython display-name=FINA-DEV The python-home option is what you should use to refer to a Python virtual environment. > WSGIProcessGroup fina.dev.harwoodspike.com > <http://fina.dev.harwoodspike.com/> You should also have: WSGIApplicationGroup %{GLOBAL} when delegating only the one application to the daemon process group to avoid issues with some third party Python extension modules that aren’t implemented correctly so as to work in Python sub interpreters. Graham > WSGIScriptAlias / /home/devharwoodspike/python-apps/fina/fina/wsgi.py > ErrorLog /home/devharwoodspike/python-apps/fina/error_log > #LogLevel debug > > # for django > Alias /static/ /home/devharwoodspike/python-apps/fina/static/ > <Directory /home/devharwoodspike/python-apps/fina/static> > Options -Indexes +MultiViews +FollowSymLinks > Order allow,deny > Allow from all > </Directory> > > Alias /media/ /home/devharwoodspike/python-apps/fina/media/ > <Directory /home/devharwoodspike/python-apps/fina/media> > Options -Indexes +MultiViews +FollowSymLinks > Order allow,deny > Allow from all > </Directory> > </VirtualHost> > > httpd -V: > Server version: Apache/2.4.23 (cPanel) > Server built: Aug 24 2016 19:30:51 > Server's Module Magic Number: 20120211:61 > Server loaded: APR 1.5.2, APR-UTIL 1.5.2 > Compiled using: APR 1.5.2, APR-UTIL 1.5.2 > Architecture: 64-bit > Server MPM: worker > threaded: yes (fixed thread count) > forked: yes (variable process count) > Server compiled with.... > -D APR_HAS_SENDFILE > -D APR_HAS_MMAP > -D APR_HAVE_IPV6 (IPv4-mapped addresses disabled) > -D APR_USE_SYSVSEM_SERIALIZE > -D APR_USE_PTHREAD_SERIALIZE > -D SINGLE_LISTEN_UNSERIALIZED_ACCEPT > -D APR_HAS_OTHER_CHILD > -D AP_HAVE_RELIABLE_PIPED_LOGS > -D DYNAMIC_MODULE_LIMIT=256 > -D HTTPD_ROOT="/etc/apache2" > -D SUEXEC_BIN="/usr/sbin/suexec" > -D DEFAULT_PIDLOG="/var/run/apache2/httpd.pid" > -D DEFAULT_SCOREBOARD="logs/apache_runtime_status" > -D DEFAULT_ERRORLOG="logs/error_log" > -D AP_TYPES_CONFIG_FILE="conf/mime.types" > -D SERVER_CONFIG_FILE="conf/httpd.conf" > > Things that seems to work: > 1) When I comment out the WSGIDaemon / WSGIProcessGroup and switch to > embedded mode then it works, but I would rather have the daemon > 2) When I modified the httpd.conf to have all *:80 and *:443 it worked but > cpanel rewrites the file so this would only be temporary > 3) In the post above Graham suggested putting r->server = wsgi_server; after > ap_update_vhost_from_headers(r); which worked as well > > -- > 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] > <mailto:[email protected]>. > To post to this group, send email to [email protected] > <mailto:[email protected]>. > Visit this group at https://groups.google.com/group/modwsgi > <https://groups.google.com/group/modwsgi>. > For more options, visit https://groups.google.com/d/optout > <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.
