我在 Wirecloud 中进行了基本安装,它与浏览器中的 IP:Port 配合得很好。但是当我尝试将 Wirecloud 放在 apache 后面时,它只会对某些部分收费或向某些路径发出请求。
这是我的apache配置:
<VirtualHost *:80>
ServerAlias myserver.com
ServerName myserver.com
<Directory /opt/wirecloud_instance/wirecloud_instance>
<Files "wsgi.py">
Require all granted
</Files>
</Directory>
### Wirecloud ###
WSGIPassAuthorization On
WSGIDaemonProcess wirecloud python-path=/opt/wirecloud_instance user=wirecloud group=wirecloud
WSGIScriptAlias / /opt/wirecloud_instance/wirecloud_instance/wsgi.py
<Location />
WSGIProcessGroup wirecloud
</Location>
Alias /static /opt/wirecloud_instance/static
<Location "/static">
SetHandler None
Require all granted
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 week"
</IfModule>
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</Location>
<Location "/static/cache">
Require all granted
<IfModule mod_expires.c>
ExpiresDefault "access plus 3 years"
</IfModule>
</Location>
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPreserveHost on
ProxyPass /mashup http://localhost:8087/
</VirtualHost>
当然,Wirecloud 运行在 8087 端口。
当我通过 IP:Port 访问 Wirecloud 时,我可以在日志中看到以下内容:
[21/Dec/2015 02:09:16] "GET / HTTP/1.1" 200 1615
[21/Dec/2015 02:09:17] "GET /api/i18n/js_catalogue?language=es&v= HTTP/1.1" 200 15778
[21/Dec/2015 02:09:17] "GET /static/cache/css/8b10fb9ee986.css HTTP/1.1" 200 131167
[21/Dec/2015 02:09:17] "GET /static/cache/js/3574aebf19e5.js HTTP/1.1" 200 839375
[21/Dec/2015 02:09:17] "GET /static/images/logos/header.png HTTP/1.1" 200 6872
[21/Dec/2015 02:09:17] "GET /api/preferences/platform HTTP/1.1" 200 2
[21/Dec/2015 02:09:17] "GET /api/workspaces HTTP/1.1" 200 2
[21/Dec/2015 02:09:17] "GET /api/context HTTP/1.1" 200 595
[21/Dec/2015 02:09:17] "GET /static/fonts/opensans-bold-webfont.woff?69f4b4a30f27 HTTP/1.1" 200 63564
[21/Dec/2015 02:09:17] "GET /static/fonts/opensans-regular-webfont.woff?69f4b4a30f27 HTTP/1.1" 200 63712
[21/Dec/2015 02:09:17] "GET /api/theme/wirecloud.defaulttheme?v=79224cfb9381f0db5a2ccf7ed2399e60978657cf HTTP/1.1" 200 1974
[21/Dec/2015 02:09:17] "GET /static/fonts/fontawesome-webfont.woff?v=3.2.1&69f4b4a30f27 HTTP/1.1" 200 43572
但如果我通过 apache 访问,我只会得到:
[21/Dec/2015 02:09:16] "GET / HTTP/1.1" 200 1615
提前致谢