HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   [Nginx+Apache] Unable to access awstats (http://www.howtoforge.com/forums/showthread.php?t=51519)

vancip 18th February 2011 21:52

[Nginx+Apache] Unable to access awstats
 
Hello!
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?

falko 19th February 2011 16:47

Are there any errors in Apache's error log?

vancip 19th February 2011 18:30

Quote:

Originally Posted by falko (Post 251673)
Are there any errors in Apache's error log?

[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)
{
break;
}

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


All times are GMT +2. The time now is 18:31.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.