Title: wordpress in docker
Last modified: March 14, 2018

---

# wordpress in docker

 *  [theturtle](https://wordpress.org/support/users/theturtle/)
 * (@theturtle)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/wordpress-in-docker-2/)
 * my site is a NAT environment
 * It was :
    web browser -> IP sharing device (port forwarding) -> NAS (192.168.1.
   x) hosting wordpress site
 * WP Statistics works perfectly.
 * Now I changed the environment to
 * web browser -> IP sharing device (port forwarding) -> NAS (192.168.1.x) hosting
   docker (172.17.0.1) -> wordpress container/site (172.17.0.4)
 * WP Statistics works, but all the incoming IP address are 172.17.0.1
 * Any idea for this situation ?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Mostafa Soufi](https://wordpress.org/support/users/mostafas1990/)
 * (@mostafas1990)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wordpress-in-docker-2/#post-10158606)
 * Please create a file on your server and put below code to see the IP:
 * `<?php print_r($_SERVER); ?>`
 * Let me know about the result of your test.
 *  [adlerweb](https://wordpress.org/support/users/adlerweb/)
 * (@adlerweb)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/wordpress-in-docker-2/#post-10226449)
 * In the current form (12.3.6) WP-Statistics will only use $_SERVER[‘REMOTE_ADDR’]
   as source for visitor IP addresses (“includes/classes/class-wp-statistics.php:
   845ff). When running behind some types of load balancers, CDNs, Proxys – or in
   your case docker – this might only point to the previous server instead of the
   visitor. Most of these systems will send an additional header like “X-Forwarded-
   For” or “X-Real-IP” containing the originating system. Adding support for these
   headers is just 4 additional lines and would allow to use WP-Statistic even in
   these situations.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘wordpress in docker’ is closed to new replies.

 * ![](https://ps.w.org/wp-statistics/assets/icon.svg?rev=3081064)
 * [WP Statistics – Simple, privacy-friendly Google Analytics alternative](https://wordpress.org/plugins/wp-statistics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-statistics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-statistics/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-statistics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-statistics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-statistics/reviews/)

 * 2 replies
 * 3 participants
 * Last reply from: [adlerweb](https://wordpress.org/support/users/adlerweb/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/wordpress-in-docker-2/#post-10226449)
 * Status: not resolved