LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-03-2012, 01:39 AM   #1
Rafael25
Member
 
Registered: Jul 2012
Posts: 55

Rep: Reputation: Disabled
NGINX + AWStats


Hi,

I am trying to install AWStats with NGINX on my CentOS server but no luck.

Can anyone help me get it working and direct me to a proper guide.

Thanks in advance.
 
Old 12-03-2012, 04:42 AM   #2
rosehosting.com
Member
 
Registered: Jun 2012
Location: Missouri, USA
Posts: 236

Rep: Reputation: 64
You can find a lot of tutorials about nginx and awstats on the internet.

Basically you need to specify a log format compatible with Apache's format.

Code:
  log_format main '$remote_addr - $remote_user [$time_local] '
                '"$request" $status $body_bytes_sent "$http_referer" '
                '"$http_user_agent" "$http_x_forwarded_for"' ;
 
  access_log /var/log/nginx/access.log main;

http://www.rubynginx.com/index.php/2...inx-on-ubuntu/

Quote:
Originally Posted by Rafael25 View Post
Hi,

I am trying to install AWStats with NGINX on my CentOS server but no luck.

Can anyone help me get it working and direct me to a proper guide.

Thanks in advance.

Last edited by rosehosting.com; 12-03-2012 at 04:45 AM.
 
Old 12-04-2012, 01:19 AM   #3
Rafael25
Member
 
Registered: Jul 2012
Posts: 55

Original Poster
Rep: Reputation: Disabled
Hi,

The tutorial did not work well for me.
When I visit the URL. It leads me to a 404 Error.


This is a part of my config :
Code:
location ^~ /awstats-icon {
    alias /var/www/awstats/icon;
    access_log off;
}

location ^~ /awstatscss {
    alias /var/www/awstats/css;
    access_log off;
}

location ^~ /awstatsclasses {
    alias /var/www/awstats/classes;
    access_log off;
}

# Configure /cgi-bin/scripts to go through php-fastcgi
location ~ ^/cgi-bin/.*\.(cgi|pl|py|rb) {
    gzip off;
    fastcgi_pass  127.0.0.1:4932;
    fastcgi_index cgi-bin.php;
    fastcgi_param SCRIPT_FILENAME    /etc/nginx/cgi-bin.php;
    fastcgi_param SCRIPT_NAME        /cgi-bin/cgi-bin.php;
    fastcgi_param X_SCRIPT_FILENAME  /var/www/awstats$fastcgi_script_name;
    fastcgi_param X_SCRIPT_NAME      $fastcgi_script_name;
    fastcgi_param QUERY_STRING       $query_string;
    fastcgi_param REQUEST_METHOD     $request_method;
    fastcgi_param CONTENT_TYPE       $content_type;
    fastcgi_param CONTENT_LENGTH     $content_length;
    fastcgi_param GATEWAY_INTERFACE  CGI/1.1;
    fastcgi_param SERVER_SOFTWARE    nginx;
    fastcgi_param REQUEST_URI        $request_uri;
    fastcgi_param DOCUMENT_URI       $document_uri;
    fastcgi_param DOCUMENT_ROOT      $document_root;
    fastcgi_param SERVER_PROTOCOL    $server_protocol;
    fastcgi_param REMOTE_ADDR        $remote_addr;
    fastcgi_param REMOTE_PORT        $remote_port;
    fastcgi_param SERVER_ADDR        $server_addr;
    fastcgi_param SERVER_PORT        $server_port;
    fastcgi_param SERVER_NAME        $server_name;
    fastcgi_param REMOTE_USER        $remote_user;
}
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Nginx + Awstats - running configuration ? dlugasx Linux - Server 3 07-07-2011 05:02 PM
nginx + php-fpm and nginx modules fantasygoat Linux - Server 0 06-09-2011 12:21 PM
LXer: Nginx+Varnish compared to Nginx LXer Syndicated Linux News 0 04-27-2011 02:30 PM
Nginx experts help me-problem when using Nginx php-fpm !!! HuMan-BiEnG Linux - Server 2 04-17-2011 02:30 PM
NGINX with PHP-FPM vis NGINX with Spawn-FCGI WhisperiN Linux - Server 1 03-15-2011 06:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration