Not the first time have had complaints about logging not working if IP based virtual hosts are used. I thought I had fixed it, so will need to do some more investigation.
I have created: http://code.google.com/p/modwsgi/issues/detail?id=276 to remind myself when I have time. Graham On 13 November 2012 04:12, Mark McKinstry <[email protected]> wrote: > Graham, > > Sorry for the delay in replying. There's only one site and one IP on > the test box. > > When I set the IP address to '*', apache will give this warning > '[warn] _default_ VirtualHost overlap on port 443, the first has > precedence'. It is just a warning so I tried things to see how they > work out with the IP set as '*': > > If I have the VirtualHost for example.com defined in > 1_vhost_example.com.conf and the default ssl.conf from mod_ssl, the > ssl and non-ssl version of example.com both write to the correct log > defined in the vhost. > > If I have the VirtualHost for example.com defined in > vhost_example.com.conf and the default ssl.conf from mod_ssl, the page > won't load at all since the vhost in ssl.conf takes precedence and > loads the default CentOS page. > > So maybe the problem is with which config file gets loaded first? > > > Mark > > On Oct 28, 5:58 pm, Graham Dumpleton <[email protected]> > wrote: > > Is this box multi hosting SSL for different sites by IP address? > > > > Can you try with '*' instead of actual IP address in VirtualHost. > > > > Graham > > > > On 26 October 2012 06:19, Mark McKinstry <[email protected]> wrote: > > > > > > > > > > > > > > > > > Hello, > > > > > When I have two vhosts set up, one for non-ssl and one for ssl, I am > unable > > > to get errors to appear in the defined ErrorLog for the vhost using > ssl. I > > > appear to be experiencing > > >http://code.google.com/p/modwsgi/issues/detail?id=79although I can > > > reproduce the issue and can provide access to a test box that has the > setup > > > if it is needed for debugging. > > > > https://groups.google.com/d/msg/modwsgi/wQk-fyS5mPs/qSBMZXDjW2QJreported a > > > similar issue although it was attributed to a memory issue. > > > > > I am using stock CentOS 6.3 x86_64, all stock RPMS (httpd 2.2.15, > python > > > 2.6.6), and mod_wsgi 3.4 compiled from source. The wsgi file at > > > /var/www/html/foo.wsgi simply has 'import foobar' in it so it will fail > > > quickly and generate an error that should be logged. > > > > > With the following config file defined in > > > /etc/httpd/conf.d/vhost_example.com.conf, the non-ssl one is logged to > the > > > correct log file. The ssl one is not logged at all, stracing the > process > > > shows it is trying to write to file descriptor 4294967295 (2^32 - 1) > which > > > does not exist. > > > > > <VirtualHost 1.2.3.4:80> > > > DocumentRoot /var/www/html > > > ServerName example.com > > > > > ErrorLog /var/log/httpd/example.com_error.log > > > CustomLog /var/log/httpd/example.com_transfer.log combined > > > > > WSGIDaemonProcess example.com umask=0022 processes=1 threads=1 > > > display-name=wsgi_no_ssl > > > WSGIProcessGroup example.com > > > WSGIScriptAlias / /var/www/html/foo.wsgi > > > </VirtualHost> > > > <VirtualHost 1.2.3.4:443> > > > DocumentRoot /var/www/html > > > ServerName example.com > > > > > ErrorLog /var/log/httpd/example.com_error.log > > > CustomLog /var/log/httpd/example.com_transfer.log combined > > > > > SSLEngine on > > > SSLCertificateKeyFile /etc/pki/tls/private/localhost.key > > > SSLCertificateFile /etc/pki/tls/certs/localhost.crt > > > > > WSGIDaemonProcess example.com-SSL umask=0022 processes=1 threads=1 > > > display-name=wsgi_ssl > > > WSGIProcessGroup example.com-SSL > > > WSGIScriptAlias / /var/www/html/foo.wsgi > > > </VirtualHost> > > > > > I then tried the following configuration which resulted in the same > thing > > > happening: non-ssl logs the error fine but ssl errors are written to > the > > > file descriptor 4294967295 (2^32 - 1) which doesn't exist. > > > > > <VirtualHost 1.2.3.4:80> > > > DocumentRoot /var/www/html > > > ServerName example.com > > > > > ErrorLog /var/log/httpd/example.com_error.log > > > CustomLog /var/log/httpd/example.com_transfer.log combined > > > > > WSGIDaemonProcess example.com umask=0022 processes=1 threads=1 > > > display-name=wsgi_everything > > > WSGIProcessGroup example.com > > > WSGIScriptAlias / /var/www/html/foo.wsgi > > > </VirtualHost> > > > <VirtualHost 1.2.3.4:443> > > > DocumentRoot /var/www/html > > > ServerName example.com > > > > > ErrorLog /var/log/httpd/example.com_error.log > > > CustomLog /var/log/httpd/example.com_transfer.log combined > > > > > SSLEngine on > > > SSLCertificateKeyFile /etc/pki/tls/private/localhost.key > > > SSLCertificateFile /etc/pki/tls/certs/localhost.crt > > > > > WSGIProcessGroup example.com > > > WSGIScriptAlias / /var/www/html/foo.wsgi > > > </VirtualHost> > > > > > I then tried the following configuration and it resulted in the > non-ssl one > > > being logged correctly and the ssl one being logged to the main apache > ssl > > > error log. This one is an improvement since it is logged somewhere, > just not > > > to the ErrorLog as defined in the vhost. > > > > > WSGIDaemonProcess example.com umask=0022 processes=1 threads=1 > > > display-name=wsgi_everything > > > <VirtualHost 1.2.3.4:80> > > > DocumentRoot /var/www/html > > > ServerName example.com > > > > > ErrorLog /var/log/httpd/example.com_error.log > > > CustomLog /var/log/httpd/example.com_transfer.log combined > > > > > WSGIProcessGroup example.com > > > WSGIScriptAlias / /var/www/html/foo.wsgi > > > </VirtualHost> > > > <VirtualHost 1.2.3.4:443> > > > DocumentRoot /var/www/html > > > ServerName example.com > > > > > ErrorLog /var/log/httpd/example.com_error.log > > > CustomLog /var/log/httpd/example.com_transfer.log combined > > > > > SSLEngine on > > > SSLCertificateKeyFile /etc/pki/tls/private/localhost.key > > > SSLCertificateFile /etc/pki/tls/certs/localhost.crt > > > > > WSGIProcessGroup example.com > > > WSGIScriptAlias / /var/www/html/foo.wsgi > > > </VirtualHost> > > > > > Has anyone seen this problem before or have ideas on how to fix it? > I've > > > been able to reproduce this on three different CentOS 6 boxes but > haven't > > > tried other distros yet. > > > > > -- > > > You received this message because you are subscribed to the Google > Groups > > > "modwsgi" group. > > > To view this discussion on the web visit > > >https://groups.google.com/d/msg/modwsgi/-/J2xpZtFMNfsJ. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > > > [email protected]. > > > For more options, visit this group at > > >http://groups.google.com/group/modwsgi?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "modwsgi" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/modwsgi?hl=en. > > -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
