Welcome! Log In Create A New Profile

Advanced

Images Aren't Displaying When Perl Interpreter Is Enabled

January 16, 2014 02:47AM
I have awstats set up and working with Nginx and perl but all images return a 404 error. The virtual host config is identical to other websites where images work fine except for the added part for perl.

I think i know what's happening but i dont know how to fix it; images are being sent to the perl interpreter instead of Nginx. Here's my config:

server {
listen 1.2.3.4:80;
server_name stats.example.com;
rewrite ^ https://$server_name$request_uri? permanent;
}

server {
listen 1.2.3.4:443;
server_name stats.example.com;

access_log /path/to/logs/stats/access.log;

error_log /path/to/logs/stats/error.log;

index awstats.pl index.html index.htm;
client_max_body_size 40M;

ssl on;
ssl_certificate /etc/nginx/ssl/ssl.crt;
ssl_certificate_key /etc/nginx/ssl/private.key;

location / {
root /path/to/the/awstats/wwwr;
index index.html index.htm;
try_files $uri $uri/ /index.html?$uri&$args;
auth_basic "Restricted";
auth_basic_user_file /path/to/the/awstats/htpasswd;
}

# Block Image Hotlinking
location /icon/ {
valid_referers none blocked stats.example.com;
if ($invalid_referer) {
return 403;
}
}

# Dynamic stats.
location ~ \.pl$ {
gzip off;
include /etc/nginx/fastcgi_params;
fastcgi_pass 127.0.0.1:8999;
fastcgi_index index.pl;
fastcgi_param SCRIPT_FILENAME /path/to/the/awstats/wwwroot/$fastcgi_script_name;
}
}
Subject Author Posted

Images Aren't Displaying When Perl Interpreter Is Enabled

MasterMind January 16, 2014 02:47AM

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

Jonathan Matthews January 16, 2014 04:12AM

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

MasterMind January 23, 2014 11:33PM

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

MasterMind January 23, 2014 11:45PM

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

Francis Daly January 24, 2014 04:00AM

Re: Images Aren't Displaying When Perl Interpreter Is Enabled

MasterMind February 12, 2014 12:11AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 285
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready