Interesting. I tried changing the order, but that did not make a difference.
However, at closer look at my httpd-ssl.conf
file I discovered another entry (much lower in the file) for port 8080. This is what it looks like:
<VirtualHost www.myserver.com:443>
...
<IfModule mod_proxy.c>
ProxyRequests Off
...
ProxyPass /piwik/ http://192.168.1.104:8080/
ProxyPassReverse /piwik/ http://192.168.1.104:8080/
...
RewriteRule ^(.+)$ https://www.myserver.com/$1 [P,L]
</IfModule>
...
<Proxy "http://192.168.1.104:8080">
ProxyHTMLEnable on
ProxyHTMLExtended on
ProxyHTMLURLMap http://192.168.1.104:8080 https://www.myserver.com/piwik
</Proxy>
...
</VirtualHost>
For http://192.168.1.104:8080
I have the following:
<VirtualHost _default_:8080>
ServerName 192.168.1.104:8080
AddHandler text/html .html
LogLevel warn
# RewriteCond %{REQUEST_URI} analytics
# RewriteRule .* https://www.myserver.com/piwik/
<Directory "D:/www/piwik">
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
DocumentRoot "D:/www/piwik"
DirectoryIndex index.php
</VirtualHost>
As a side note. As it stands, something is not working properly with the setup. Somehow Piwik is not recording visits from different domain names. I don’t know if this would be related. It somehow only records domain name visits from https://www.myserver.com/
and none of the other domain names. I use to have it working not using https
but http
. This is my VB code:
(I sins found the problem / see correction in bold)
<%
function write_site_number()
if DotComType = "ch" then
response.write("2")
elseif DotComType = "com" then
response.write("1")
elseif DotComType = "eu" then
response.write("3")
else
response.write("4")
end if
end function
%><script type="text/javascript">
var _paq = _paq || [];
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.myserver.<%=DotComType %>"]);
_paq.push(["setDomains", ["*.myserver.<%=DotComType %>"]]);
<%
if request.querystring("addCampain") <> "" then %>
_paq.push(["setCampaignNameKey", "helloName"]);
_paq.push(["setCampaignKeywordKey", "helloKey"]);
_paq.push(["setCustomVariable",1,"var","name","visitor"]);<%
end if
%>
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
this did not track calls from: www.myserver.ch
or www.myserver.net
var u="//www.myserver.com/piwik/";
new - adding the https works:
var u="https//www.myserver.com/piwik/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
_paq.push(['setSiteId', '<% call write_site_number() %>']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.defer=true; g.async=true;
g.src=u+'piwik.js'; s.parentNode.insertBefore(g,s);
})();
</script>
<noscript><p><img src='https://www.myserver.com/piwik/piwik.php?idsite=<%
call write_site_number() %>' style="border:0;" alt="" /></p></noscript>