Page 1 of 1

example.com/vstats redirect back to example.com

Posted: Thu Feb 18, 2016 12:10 am
by cybaster85
everything works fine since the installation

but we found that the stats page can not be visited either from vestacp link or direct url

we have already done chmod 744 for /home/fashion/web/example.com/stats

but it still redirect back to index page of example.com

nginx+php-fpm default template

Re: example.com/vstats redirect back to example.com

Posted: Sun Feb 21, 2016 2:39 pm
by cybaster85
not sure if anyone can help me

after doing some research i foudn that awstats config alias are missing in /etc/nginx/conf.d/

i would like to add it by myself but no luck, i had tried

location /vstats{
alias /usr/share/awstats/;

location ~ /(libraries|setup) {
return 404;
}

location ~ ^/vstats/(.*\.php)$ {
alias /usr/share/awstats/$1;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $request_filename;
}
}


any one can provide some help?

Re: example.com/vstats redirect back to example.com

Posted: Mon Mar 28, 2016 8:58 am
by Falzo
I did use a per domain config e.g. /home/admin/conf/web/nginx.example.org.conf in which to put:

Code: Select all

location /vstats {
        alias /home/admin/web/example.org/stats/;
}
which works so far.

probably this small part should be in the per domain nginx-template though, you can take a look into /usr/local/vesta/data/templates/nginx/php5-fpm and probably make your own ;-)