WordPress.org

Forums

WP-Piwik
SSL Bug (3 posts)

  1. markthebro
    Member
    Posted 2 years ago #

    hey guys!

    my current apache configuration:

    [...]

    <VirtualHost piwik.kloiberm.com:80>
    ServerAdmin xxxxx@kloiberm.com
    DocumentRoot /xxxx/yyy/zzzz
    ServerName piwik.kloiberm.com

    ErrorLog /xxxx/yyy/zzzz//logs/error.log
    CustomLog /xxxx/yyy/zzzz/logs/access.log combined

    Redirect permanent / https://piwik.kloiberm.com/
    </VirtualHost>

    <VirtualHost piwik.kloiberm.com:443>
    ServerName piwik.kloiberm.com
    DocumentRoot /xxxx/yyy/zzzz

    ErrorLog /xxxx/yyy/zzzz/logs/error.log
    CustomLog /xxxx/yyy/zzzz/logs/access.log combined

    #CERTIFICATES#
    ....
    </VirtualHost>

    [...]

    yesterday: when i added the url (https://piwik.kloiberm.com) in the wp-piwik plugin with my token it always said unknown site/blog. [Support]
    and the testscript returned the following:
    *** Test 1/2: SitesManager.getSitesWithAtLeastViewAccess ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: https://piwik.kloiberm.com/?module=API&method=SitesManager.getSitesWithAtLeastViewAccess&format=XML&token_auth= + TOKEN
    Result:

    Time: 0.18s

    *** Test 2/2: SitesManager.getSitesIdFromSiteUrl ***
    Using: cURL
    SSL peer verification: enabled
    User Agent:
    Call: https://piwik.kloiberm.com/?module=API&method=SitesManager.getSitesIdFromSiteUrl&url= THE URL &format=XML&token_auth= + TOKEN
    Result:

    Time: 0.15s

    now i get the error message: Piwik did not answer. Please check your entered Piwik URL

    when i change the url to http://piwik.kloiberm.com the testscript returns the error 301 moved permantly

    when i change the apache2 config and make piwik accessable through port 80 everything runs and works perfectly. (i just comment the redirect permanent statement out)

    could you please help me? :)

    https://wordpress.org/plugins/wp-piwik/

  2. markthebro
    Member
    Posted 2 years ago #

    okay, i turned off the permanent redirect in the apache configuration, turned on the allowoveride all and put the following htaccess in the piwik root folder

    RewriteEngine On

    RewriteCond %{REMOTE_ADDR} !12\.34\.56\.78
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    RewriteCond %{REMOTE_ADDR} 12\.34\.56\.78
    RewriteCond %{HTTPS} on
    RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

    12\.34\.56\.78 = the server ip, wordpress is running on

    when the user access the piwik page, he/she is forced to use ssl, and the wp plugin communicates through port 80. however, not the best solution but still one.

  3. braekling
    Member
    Plugin Author

    Posted 1 year ago #

    WP-Piwik works fine using SSL, so I'm sure we can get your site working, too ;-)

    Are you using a self-signed certificate? In this case, you should disable the SSL peer verification.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Piwik
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.