Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Nginx, Apache & Webalizer stats
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Nginx, Apache & Webalizer stats

DrukpaDrukpa Member
edited November 2013 in Help

I created a page on my domain as domain.com/stats. After uploading it to my server, when I visited the page, I was shocked to see the webalizer stats for the domain instead of my page.

My VPS configuration is as follows:

  • Nginx webserver listening on port 80
  • Apache webserver listening on port 8080
  • Centos 6 OS
  • Webmin/virtualmin control panel
  • Nginx serves as reverse proxy. Serves all static files on page from nginx, and forwards PHP file requests to apache.

In my apache server configuration in the webalizer section, it has the following code:

<Location /usage>
    Order deny,allow
    Deny from all
    Allow from 127.0.0.1
    Allow from ::1
    # Allow from .example.com
</Location>

Now am thinking, that since the request comes from nginx to apache, it identifies the IP as localhost/127.0.0.1 and not my real IP.

In my nginx configuration (proxy.conf) I have the real IP forwarded as:

proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

Can anyone help me stop webalizer from publishing my stats to the outside world?

Comments

  • Ok, resolved it myself by unticking "generate webalizer report" in the "Edit Virtual Server" section. Mods, please kindly delete/close this thread. Thanks.

  • Try

    Deny from All
    SetEnvIF X-Real-IP "127.0.0.1" AllowIP
    SetEnvIF X-Real-IP "::1" AllowIP
    Allow from env=AllowIP
    

    if you still want to fix that .htaccess

Sign In or Register to comment.