Hi!
I've send you my config files. Do you know where the problem with
WSGIDaemonProcess is? Why I can't put them inside the 1st VH?
Thanks!
On Wednesday, April 10, 2013 5:41:47 PM UTC+2, Garito wrote:
>
> This is how I have the Apache conf now
>
> Two files:
>
> ApacheVirtualHost.conf is the main file (included in the apache virtual
> host config)
>
> # Reduce la cadena Server a Apache (Prod)
> ServerTokens Prod
> # Esta no tengo muy claro que hace pero tambien es para reducir la
> capacidad de information gathering por parte del atacante
> ServerSignature Off
>
> Listen 443
> NameVirtualHost *:443
>
> WSGIDaemonProcess Yanged processes=8 threads=1 display-name=%{GROUP}
> user=garito group=staff
> # Apache en modo monoproceso:
> # WSGIDaemonProcess Yanged processes=1 threads=1 display-name=%{GROUP}
> user=garito group=staff
>
> # Configuracion recomendada por Graham para worker MPM de Apache
> http://blog.dscpl.com.au/2012/10/why-are-you-using-embedded-mode-of.html
> # Entiendo que el usa 2 procesos porque tiene 2 cpu's?. Lo que no entiendo
> es los 15 threads
> #
> # WSGIDaemonProcess sistes.net processes=2 threads=15
> display-name=%{GROUP} user=garito group=staff
>
> <VirtualHost *:80>
> Include /Users/garito/Yanged/YangedApache.conf
> </VirtualHost>
>
> <VirtualHost *:443>
> Include /Users/garito/Yanged/YangedApache.conf
>
> <IfModule ssl_module>
> SSLEngine on
> SSLProtocol all -SSLv2
> SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM
>
> SSLCertificateFile /Users/garito/Yanged/Certificados/ssl.crt
> SSLCertificateKeyFile /Users/garito/Yanged/Certificados/ssl.key
> SSLCertificateChainFile
> /Users/garito/Yanged/Certificados/sub.class1.server.ca.pem
> SSLCACertificateFile /Users/garito/Yanged/Certificados/ca.pem
> </IfModule>
> </VirtualHost>
>
> And the common directives file YangedApache.conf
>
> ServerName macbook-de-garito.local
> ServerAlias 192.168.1.38
> ServerAlias example.net
> ServerAlias www.example.net
> ServerAdmin "[email protected]"
>
> WSGIScriptAlias / /Users/garito/Yanged/Runner/yRun.py process-group=Yanged
> application-group=%{GLOBAL}
>
> <Directory "/Users/garito/Yanged/Runner">
> Order deny,allow
> allow from all
> </Directory>
>
> ErrorLog "/Users/garito/Yanged/Logs/ErroresLargo"
>
> LogFormat "%h %{uuid1}C %{uuid2}C %t \"%r\" %>s %B \"%{Referer}i\"
> \"%{User-Agent}i\" \"%{Accept}i\" \"%{Accept-Language}i\"
> \"%{X-Requested-With}i\" \"%{Content-Type}o\" %I %O %D" yanged
> CustomLog "|/Users/garito/Yanged/logAMongo/aMongo.py" yanged
> LogLevel debug
>
> # Gzip. No va mas rapido pero envia un tercio menos al navegador. Bueno
> para mobile
> <IfModule mod_deflate.c>
> # Force deflate for mangled headers
> developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
> <IfModule mod_setenvif.c>
> <IfModule mod_headers.c>
> SetEnvIfNoCase
> ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$
> ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
> RequestHeader append Accept-Encoding "gzip,deflate"
> env=HAVE_Accept-Encoding
> </IfModule>
> </IfModule>
>
> # Compress all output labeled with one of the following MIME-types
> # (for Apache versions below 2.3.7, you don't need to enable
> `mod_filter`
> # and can remove the `<IfModule mod_filter.c>` and `</IfModule>`
> lines as
> # `AddOutputFilterByType` is still in the core directives)
> <IfModule mod_filter.c>
> AddOutputFilterByType DEFLATE application/atom+xml \
> application/javascript \
> application/json \
> application/rss+xml \
> application/vnd.ms-fontobject \
> application/x-font-ttf \
> application/xhtml+xml \
> application/xml \
> font/opentype \
> image/png \
> image/jpg \
> image/svg+xml \
> image/x-icon \
> text/css \
> text/html \
> text/plain \
> text/x-component \
> text/xml
> </IfModule>
> </IfModule>
>
> <IfModule mod_headers.c>
> Header set Connection Keep-Alive
> </IfModule>
>
> <IfModule mod_rewrite.c>
> RewriteEngine on
>
> # Reenvia favicon.ico a favicon.ico/
> RewriteCond %{REQUEST_URI} favicon.ico$
> RewriteRule .? %{REQUEST_URI}/ [R]
>
> # Reenvia los ficheros *.less a *.less/
> RewriteCond %{REQUEST_URI} .less$
> RewriteRule .? %{REQUEST_URI}/ [E=O_PATH_INFO:/$1/,R]
> </IfModule>
>
> As you can note, I'm making the E flag tests with the less redirection
> (this will not be as it is in the production server, only for testing now)
>
> On Wednesday, April 10, 2013 5:55:09 AM UTC+2, Graham Dumpleton wrote:
>>
>> WSGIDaemonProcess Yanged processes=8 threads=1
>>>>>>> display-name=%{GROUP} user=garito group=staff
>>>>>>> WSGIProcessGroup Yanged
>>>>>>>
>>>>>>
>>>>>> The WSGIProcessGroup is not needed as you have process-group option
>>>>>> on WSGIScriptAlias.
>>>>>>
>>>>>
>>>>> Which one do you prefer? Or What are the differences?
>>>>>
>>>>
>>>> Either can be used. WSGIProcessGroup will not override process-group
>>>> option on WSGIScriptAlias though.
>>>>
>>>> Also, if you specify both process-group and application-group options
>>>> to WSGIScriptAlias, it will preload the WSGI script on process start as
>>>> well.
>>>>
>>>
>>> You mean that?: process-group=Yanged application-group=%{GLOBAL}
>>> I try to watch/read everything you post about mod_rewrite. I'm pretty
>>> sure I've put that sometime ago because I read/watch your recommendation.
>>> Glad to read that
>>>
>>
>> The documentation on this isn't good. Is only noted in:
>>
>> http://code.google.com/p/modwsgi/wiki/ChangesInVersion0300
>>
>> See (2) under 'Features Added'.
>>
>>
>>> </VirtualHost>
>>>>>>>
>>>>>>>
>>>>>>> <VirtualHost *:443>
>>>>>>> ServerName example.net
>>>>>>> ServerAlias www.example.net
>>>>>>> ServerAdmin "[email protected]"
>>>>>>>
>>>>>>> WSGIProcessGroup Yanged
>>>>>>>
>>>>>>
>>>>>> Don't need WSGIProcessGroup here.
>>>>>>
>>>>>> You are also though missing:
>>>>>>
>>>>>> WSGIScriptAlias / /Users/garito/Yanged/Runner/yR****un.py
>>>>>> process-group=Yanged application-group=%{GLOBAL}
>>>>>>
>>>>>> <Directory "/Users/garito/Yanged/Runner">
>>>>>> Order deny,allow
>>>>>> allow from all
>>>>>> </Directory>
>>>>>>
>>>>>> In other words, the only bit for the mod_wsgi configuration not
>>>>>> duplicated is the WSGIDaemonProcess.
>>>>>>
>>>>>
>>>>> The only way I have to make it run is by putting the WSGIDaemonProcess
>>>>> outside the VS's definitions. Did I miss something or this is normal?
>>>>>
>>>>
>>>> If the issue is still about not finding the daemon process group name,
>>>> it is going to be an ordering issue. The WSGIDaemonProcess directive when
>>>> reaching across VIrtualHost's must be in the first VirtualHost read by
>>>> Apache. So, if these are in separate files and included via a wildcard,
>>>> likely the WSGIDaemonProcess is in the wrong one. Is also important that
>>>> ServerName match for both. This all presumes you are using a recent
>>>> mod_wsgi, although if using process-group option to WSGIScriptAlias you
>>>> must be using mod_wsgi 3.0+, which should be okay.
>>>>
>>>
>>> The error is: WSGI process group not accessible.
>>>
>>
>> Unless something screwy is happening, that message would only come up if
>> the WSGIDaemonProcess is matched to was specified in a different
>> VirtualHost but ServerName was not the same for the two VirtualHosts.
>>
>> Since you have masked what the original values are I cant confirm
>> anything from the details you have sent in email
>>
>> 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 http://groups.google.com/group/modwsgi?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.