[Nginx+Apache] Unable to access awstats

Discussion in 'Installation/Configuration' started by vancip, Feb 18, 2011.

  1. vancip

    vancip New Member

    i've been experiencing some troubles with ISPconfig3 awstats.
    I've installed Nginx as reverse proxy for Apache using the tutorial in this site but suddenly awstats doesn't show info properly.

    Accessing with right username and password
    mysite.com/stats gives me always page 403
    mysite.com:82/stats gives me always page 403 where 82 is Apache port

    mysite.com/stats/index.html and mysite.com:82/stats/index.html work (version:82 with images, version:80 not) but no authentication required.
    I suppose there should be something to add in nginx config but what?
  2. falko

    falko Super Moderator ISPConfig Developer

    Are there any errors in Apache's error log?
  3. vancip

    vancip New Member

    [Sat Feb 19 16:52:13 2011] [error] [client xx.yy.zz.kk] Directory index forbidden by Options directive: /var/www/mysite.com/web/stats/

    May we add something in stats/.htaccess template?

    AuthType Basic
    AuthName "Members Only"
    AuthUserFile /var/www/clients/client0/web2/.htpasswd_stats
    require valid-user

    *** DirectoryIndex index.html

    Still testing about missing images:

    I wrote this as first location directive in nginx/sites-enabled/default

    location ~* ^/stats{
    proxy_pass http://$host:82;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header Host $host;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    if ($request_uri ~* ^/stats)

    I suppose this one working to force subfolder being processed only by Apache at port 82 since I wasn't unable to skip authentication window but while mysite.com:82/stats/index.html shows png files, in mysite.com/stats/index.html are missing
    Last edited: Feb 19, 2011

Share This Page