Howdy, Stranger!

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


Shells Virtual Desktop
BMail.ag - Secure Email Service
Server.net
CPLicense.net
VPS Server
Buy VPN
Vultr
VMs for AI
HostDare
ReliableSite White-Label Dedicated Hosting for Resellers
InterServer VPS
BMail.ag - Secure Email Service
Best VPN
High-Performance Bare Metal Server Solutions
Karvl.com
Server Mania Cloud Hosting
DataWagon Hosting
AlphaVPS Hosting
Evoxt.com
Clouvider
VPS Hosting with NVMe
Residential IPs in the US & 4G Mobile Proxies in EU & US with Unlimited Bandwidth
ReliableSite White-Label Dedicated Hosting for Resellers
Rabisu - Hosting Solutions
Shells Virtual Desktop
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.