Your problem is your SSL virtual host. DocumentRoot refers to
/home/dev/wsgi-scripts.
You then have:
<Directory /home/dev/wsgi-scripts>
Options MultiViews +FollowSymLinks
Order allow,deny
Allow from all
SSLOptions +StdEnvVars
Options ExecCGI
SetHandler wsgi-script
WSGIProcessGroup healthcare.in
</Directory>
So, if anyone access any static media files through SSL virtual host
it will go through mod_wsgi and it will try and interpret it as a WSGI
application.
Thus, URL is mapping to:
/home/dev/wsgi-scripts/jquery-ui-1.8.15.custom/js/jquery-ui-1.8.15.custom.min.js
mod_wsgi tries to process it as Python code and fails.
In short, your configuration is somewhat broken with your 80 and 443
virtual hosts no even really matching as they probably should.
Graham
On 12 August 2011 18:31, nitin chandra <[email protected]> wrote:
> This is configuration in Apache
>
> ServerRoot "/opt/apache2215"
>
> Listen 192.168.1.6:80
>
> LoadModule wsgi_module modules/mod_wsgi.so
>
> <IfModule !mpm_netware_module>
> <IfModule !mpm_winnt_module>
> User dev
> Group dev
>
> </IfModule>
> </IfModule>
>
> ServerAdmin [email protected]
>
> ServerName www.healthcare.in
>
> DocumentRoot "/home/dev/wsgi-scripts"
>
> <Directory />
> Options MultiViews
> AllowOverride None
> Order deny,allow
> Deny from all
> </Directory>
>
> <Directory "/home/dev/wsgi-scripts">
> Options Indexes +FollowSymLinks MultiViews
> AllowOverride All
> Order allow,deny
> Allow from all
> </Directory>
>
> <IfModule dir_module>
> DirectoryIndex index.html index.wsgi index.py index.pyc
> </IfModule>
>
> <FilesMatch "^\.ht">
> Order allow,deny
> Deny from all
> Satisfy All
> </FilesMatch>
>
> ErrorLog "logs/error_log"
>
> LogLevel warn
>
> <IfModule log_config_module>
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\"" combined
> LogFormat "%h %l %u %t \"%r\" %>s %b" common
>
> <IfModule logio_module>
> LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\"
> \"%{User-Agent}i\" %I %O" combinedio
> </IfModule>
>
> CustomLog "logs/access_log" common
>
> </IfModule>
>
> <IfModule alias_module>
> ScriptAlias /cgi-bin/ "/opt/apache2215/cgi-bin/"
> </IfModule>
>
> <IfModule cgid_module>
> </IfModule>
>
> <Directory "/opt/apache2215/cgi-bin">
> AllowOverride None
> Options MultiViews FollowSymLinks
> Order allow,deny
> Allow from all
> </Directory>
>
> DefaultType text/plain
>
> <IfModule mime_module>
> TypesConfig conf/mime.types
>
> #AddType application/x-gzip .tgz
> #AddEncoding x-compress .Z
> #AddEncoding x-gzip .gz .tgz
>
> AddType application/x-compress .Z
> AddType application/x-gzip .gz .tgz
>
> #AddHandler cgi-script .cgi
>
> #AddHandler type-map var
>
> #AddType text/html .shtml
> #AddOutputFilter INCLUDES .shtml
> </IfModule>
>
> #MIMEMagicFile conf/magic
>
> #EnableMMAP off
> #EnableSendfile off
>
> #Include conf/extra/httpd-mpm.conf
>
> #Include conf/extra/httpd-multilang-errordoc.conf
>
> #Include conf/extra/httpd-autoindex.conf
>
> #Include conf/extra/httpd-languages.conf
>
> #Include conf/extra/httpd-userdir.conf
>
> #Include conf/extra/httpd-info.conf
>
> #Include conf/extra/httpd-vhosts.conf
>
> #Include conf/extra/httpd-manual.conf
>
> #Include conf/extra/httpd-dav.conf
>
> #Include conf/extra/httpd-default.conf
>
> #Include conf/extra/httpd-ssl.conf
>
> NameVirtualHost 192.168.1.6:80
> <VirtualHost 192.168.1.6:80>
> ServerName www.healthcare.in
> ServerAlias healthcare.in
> Redirect / https://www.healthcare.in/index.py
> WSGIDaemonProcess healthcare.in processes=6 threads=15
> display-name=%{GROUP}
> WSGIProcessGroup healthcare.in
> WSGIScriptAlias / /home/dev/wsgi-scripts/index.py
> <Directory /home/dev/wsgi-scripts>
> Options MultiViews +FollowSymLinks
> Order allow,deny
> Allow from all
> </Directory>
> </VirtualHost>
>
> Listen 192.168.1.6:443
> AddType application/x-x509-ca-cert .crt
> AddType application/x-pkcs7-crl .crl
> SSLPassPhraseDialog builtin
> SSLSessionCache "shmcb:/tmp/ssl_scache(512000)"
> SSLSessionCacheTimeout 300
> SSLMutex "file:/tmp/ssl_mutex"
>
> <VirtualHost 192.168.1.6:443>
> DocumentRoot "/home/dev/wsgi-scripts/"
> ServerName www.healthcare.in
> ServerAdmin [email protected]
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
> SSLCertificateFile "/etc/cups/ssl/server.crt"
> SSLCertificateKeyFile "/etc/cups/ssl/server.key"
> <FilesMatch "\.(cgi|shtml|phtml|php|py|pyc)$">
> SSLOptions +StdEnvVars
> </FilesMatch>
> <Directory /home/dev/wsgi-scripts>
> Options MultiViews +FollowSymLinks
> Order allow,deny
> Allow from all
> SSLOptions +StdEnvVars
> Options ExecCGI
> SetHandler wsgi-script
> WSGIProcessGroup healthcare.in
> </Directory>
> BrowserMatch ".*MSIE.*" \
> nokeepalive ssl-unclean-shutdown \
> downgrade-1.0 force-response-1.0
> </VirtualHost>
> #
> <IfModule ssl_module>
> SSLRandomSeed startup builtin
> SSLRandomSeed connect builtin
> </IfModule>
>
> Reg
>
> Nitin
>
>
> On Fri, Aug 12, 2011 at 1:49 PM, Graham Dumpleton
> <[email protected]> wrote:
>> How do you have mod_wsgi configured. Just realised it is trying to
>> read your Javascript file as a Python code file. Sounds like you have
>> incorrectly setup Apache so that it things mod_wsgi should handle all
>> your static files. Missed that before.
>>
>> Graham
>>
>
> --
> 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.