Nginx - browser downloads cgi file instead of executing it

I installed monitorix from AUR and am running it with nginx.
The initial page loads fine, but then when I select any report (Daily, Weekly etc) and click OK, I get a download window for monitorix.cgi file.
Monitorix server block:
server {
listen 80;
#listen [2001:db8:ffff:1::10]:80;
server_name monitorix;
root /usr/share/webapps/monitorix;
error_log /usr/share/webapps/monitorix/logs/error.log;
access_log /usr/share/webapps/monitorix/logs/access.log;
log_not_found off;
location /cgi-bin/ {
gzip off;
root /usr/share/webapps/monitorix;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
monitorix.conf
# Monitorix - configuration file
# See monitorix.conf(5) manpage for a detailed description of each option.
title = Place a title here
hostname = nanoBox
theme_color = black
refresh_rate = 150
iface_mode = graph
enable_zoom = y
netstats_in_bps = n
disable_javascript_void = n
temperature_scale = c
show_gaps = n
global_zoom = 1
max_historic_years = 1
accept_selfsigned_certs = y
include_dir = /etc/monitorix/conf.d
base_dir = /srv/http/monitorix/
base_lib = /var/lib/monitorix/
#base_url = /
base_url = /
base_cgi = /cgi
<httpd_builtin>
enabled = n
host =
port = 8080
user = nobody
group = nobody
log_file = /var/log/monitorix-httpd
hosts_deny =
hosts_allow =
<auth>
enabled = n
msg = Monitorix: Restricted access
htpasswd = /var/lib/monitorix/htpasswd
</auth>
</httpd_builtin>
Monitorix log:
Fri Feb 27 00:07:14 2015 - Starting Monitorix version 3.6.0 (pid 29746).
Fri Feb 27 00:07:14 2015 - Loaded main configuration file '/etc/monitorix/monitorix.conf'.
Fri Feb 27 00:07:15 2015 - Initializing graphs.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/system.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/kern.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/proc.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/fs.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/net.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/netstat.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/serv.rrd' file.
Fri Feb 27 00:07:15 2015 - Creating '/var/lib/monitorix/port.rrd' file.
Fri Feb 27 00:07:16 2015 - Creating '/var/lib/monitorix/user.rrd' file.
Fri Feb 27 00:07:16 2015 - Creating '/var/lib/monitorix/int.rrd' file.
Fri Feb 27 00:07:16 2015 - Generating the 'index.html' file.
Fri Feb 27 00:07:16 2015 - Ok, ready.
Fri Feb 27 00:13:29 2015 - SIGTERM caught.
Fri Feb 27 00:13:29 2015 - Exiting.
Sat Feb 28 09:33:30 2015 - Starting Monitorix version 3.6.0 (pid 25563).
Sat Feb 28 09:33:30 2015 - Loaded main configuration file '/etc/monitorix/monitorix.conf'.
Sat Feb 28 09:33:30 2015 - Initializing graphs.
Sat Feb 28 09:33:31 2015 - Generating the 'index.html' file.
Sat Feb 28 09:33:31 2015 - Ok, ready.
Sat Feb 28 09:49:00 2015 - SIGTERM caught.
Sat Feb 28 09:49:00 2015 - Exiting.
Sat Feb 28 09:49:00 2015 - Starting Monitorix version 3.6.0 (pid 30026).
Sat Feb 28 09:49:00 2015 - Loaded main configuration file '/etc/monitorix/monitorix.conf'.
Sat Feb 28 09:49:00 2015 - Initializing graphs.
Sat Feb 28 09:49:01 2015 - Generating the 'index.html' file.
Sat Feb 28 09:49:01 2015 - Ok, ready.
Sat Feb 28 09:50:36 2015 - SIGTERM caught.
Sat Feb 28 09:50:37 2015 - Exiting.
Sat Feb 28 09:50:37 2015 - Starting Monitorix version 3.6.0 (pid 30498).
Sat Feb 28 09:50:37 2015 - Loaded main configuration file '/etc/monitorix/monitorix.conf'.
Sat Feb 28 09:50:37 2015 - Initializing graphs.
Sat Feb 28 09:50:37 2015 - Generating the 'index.html' file.
Sat Feb 28 09:50:37 2015 - Ok, ready.
Last edited by Lockheed (2015-02-28 09:09:24)

Yes, fcgiwrap is running. Here's its config:
GNU nano 2.2.6 File: /usr/lib/systemd/system/fcgiwrap.socket
[Unit]
Description=fcgiwrap Socket
[Socket]
ListenStream=/run/fcgiwrap.sock
[Install]
WantedBy=sockets.target
I don't think fcgiwraps has logs on my system.
Also, I have no way to know the exact URL I'm redirected to because the OK I click is a button (so no RMB/copy destination link possibiloity), and once I click, the download box shows up which only lists http://monitorix
EDIT:
I modified my monitorix server block:
GNU nano 2.2.6 File: /etc/nginx/sites-enabled/monitorix
server {
listen 80;
#listen [2001:db8:ffff:1::10]:80;
server_name monitorix;
root /usr/share/webapps/monitorix;
error_log /usr/share/webapps/monitorix/logs/error.log;
access_log /usr/share/webapps/monitorix/logs/access.log;
log_not_found off;
location /cgi-bin/ {
gzip off;
root /usr/share/webapps/monitorix;
include /etc/nginx/fastcgi_params;
fastcgi_pass unix:/run/fcgiwrap.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
location ~ \.cgi$ {
root /usr/share/webapps/monitorix/cgi;
fastcgi_pass unix:/run/fcgiwrap.sock;
include fastcgi.conf;
Now, when I click on OK, I get
403 Forbidden
and this is not form nginx, because there is no nginx signature underneath the error.
Last edited by Lockheed (2015-02-28 11:45:42)

Similar Messages

  • cfdocument   makes the broser download the file instead of executing it.

    I have a printable document page that is not working
    correctly. It used to work fine.
    On one of the pages i have a link: <a
    href="printppot.cfm?ID=#id#" target="_blank"> Print </a>
    When I click on this it asks me if I want to download the
    file. It used to just display the pdf.
    Should it matter if this is in https://?
    Should it matter if I have a <cfapplication> in my
    application.cfm?

    Can you check if the browser has the plugin to show the pdf
    in the browser. If the plugin is not there, the browser wouldnt
    know what to do with the file and will ask you to save it.
    Have you tried with any other client browser? If you see the
    same behaviour at all the browsers, then there is something wrong
    in the response content type. You should check the
    printport.cfm

  • Download PDF files instead of viewing them within Safari?

    I would like to automatically download PDF files instead of having to view them within Safari.
    I have disabled Acrobat as the default reader and now Safari has switched to using Preview. However, I cannot find a way to also disable Preview to allow the PDF file to be downloaded instead of displayed within a Safari window.
    Anyone have any ideas on how to do this seemingly simple task?

    It's amazing to me that simply asking Safari to default to auto download a PDF is so arcane. It's incredible that Apple doesn't have a Safari preference for this very simple action!
    The Terminal and Onyx methods recommended above are just ways of accessing a setting for Safari that Apple hasn't added to Safari Preferences. As I understand it, settings like this are built into Safari - they just aren't readily user-accessible. This is why programs like Onyx and Safari Enhancer exist, to open up "hidden" features and settings.
    I imagine Apple's developers debate these things, trying to decide what would be simpler to leave out to avoid complexity and what confusion (but allow third-party or Terminal methods to access) and which would be better added to the regular Preferences settings.
    Since this is a feature you'd like to see in Safari Preferences, I'd recommend submitting this as feedback to Apple.
    In the meantime, though, I'd consider it a good thing that there are built-in ways to get the setting that you prefer. Personally, I don't find the default settings such a hindrance. They're intended to help the "average" user (the new Mac user, the non-technical user, etc.) who wants a PDF file to just open, without having to understand how to work with it. For the more savvy user, there are multiple methods of downloading and/or opening PDFs. I'm rather like you - I prefer to download PDFs (in which case I use the Control-click method if I notice the link is to a PDF) or sometimes I allow the PDF to open in Safari, then Control-click on the open PDF and choose the option to open in Acrobat Reader. I find the latter method even smoother than downloading and then opening, in fact. If I decide it's a file I want to keep, I save it to my hard drive; otherwise I just close it.

  • On MAC, I mistakenly opened CGI (PDF) file from Wells Fargo and set option to always open download CGI files, and I need a way in Firefox to remove "always open" option.

    Firefox 5.1 - CGI is not a content type in Preferences -> Applications so I don't know what to change to be able to Save CGI files instead of always trying to Open them which doesn't work. I can open them fine when they're saved on my MAC. Is there a known way to reset whatever the parameter is that controls open/control for non-recognized content types?

    See Firefox > Preferences > Applications
    * https://support.mozilla.com/kb/Managing+file+types
    * http://kb.mozillazine.org/File_types_and_download_actions

  • LSO: Download office files instead of embedded

    Hello colleagues,
    I hope you can help me with my current issue in my current Learning Solution implementation.
    Customer wants to use as part of a web based training different kind of Microsoft Office files, mainly powerpoint files, but for windows vista and windows 7 with office 2007 and higher versions Learning Solution always tries to download the files instead of show them embedded in the MS Internet Explorer or Mozilla Firefox.
    I tried with some earlier versions of Windows, like Windows XP and this works just fine, but in Windows Vista and Windows 7, this is not working.
    Have you seen a behavior like this one? If it so, how did you solve it?
    Thank you for the help in advance!
    Regards.

    It's amazing to me that simply asking Safari to default to auto download a PDF is so arcane. It's incredible that Apple doesn't have a Safari preference for this very simple action!
    The Terminal and Onyx methods recommended above are just ways of accessing a setting for Safari that Apple hasn't added to Safari Preferences. As I understand it, settings like this are built into Safari - they just aren't readily user-accessible. This is why programs like Onyx and Safari Enhancer exist, to open up "hidden" features and settings.
    I imagine Apple's developers debate these things, trying to decide what would be simpler to leave out to avoid complexity and what confusion (but allow third-party or Terminal methods to access) and which would be better added to the regular Preferences settings.
    Since this is a feature you'd like to see in Safari Preferences, I'd recommend submitting this as feedback to Apple.
    In the meantime, though, I'd consider it a good thing that there are built-in ways to get the setting that you prefer. Personally, I don't find the default settings such a hindrance. They're intended to help the "average" user (the new Mac user, the non-technical user, etc.) who wants a PDF file to just open, without having to understand how to work with it. For the more savvy user, there are multiple methods of downloading and/or opening PDFs. I'm rather like you - I prefer to download PDFs (in which case I use the Control-click method if I notice the link is to a PDF) or sometimes I allow the PDF to open in Safari, then Control-click on the open PDF and choose the option to open in Acrobat Reader. I find the latter method even smoother than downloading and then opening, in fact. If I decide it's a file I want to keep, I save it to my hard drive; otherwise I just close it.

  • Save link as option vanished in firefox 17.0.So now not able to download mp3 files.Instead click on mp3 files starts playing in some black player in firefox

    Save link as option vanished in firefox 17.0.So now not able to download mp3 files.Instead click on mp3 files starts playing in some black player in firefox.
    Earlier i was able to download mp3 files by pressing on link for some time and menu popus up "Save link as" but after recent update that option is gone.
    That option is desperately needed.
    One more thing is MP3 file start playing in black player on firefox when i actually want to download them and then play it.
    fix this issue ASAP.

    I still have the "Save link as" option in my context menu with FF 17. Maybe something went wrong with the update?

  • Downloading .swf files instead of viewing them as a new tab

    I use several browsers on several different machines, one is not able to access the internet for reasons unknown... so, I am using a laptop in the meantime.
    My desktop would download .swf files (when clicked on) as default. the current browser merely opens them in a new tab.
    the filetype is not in the options and i have almost all the same plugins (all relevant ones to my knowlege at least...)
    i have the most recent version of the flash plugin

    i know i can do it that way, but i want to know why my other firefox browser allows me to click the link to open it and it automatically downloads.

  • Firefox won't open localhost files, it downloads the file instead and then won't show images, IE9 localhost works fine.

    I have installed XAMPP to preview web pages locally. Everything works fine in IE9 but not in Firefox. When I load a localhost page Firefox downloads the file, then displays the downloaded file without showing images within the page.
    So, in IE9 the address bar looks like this (correctly): http://localhost/my_sites/WebMaestro/Exercises/Lesson8/changeImage.html
    In Firefox the address bar looks like this: file:///C:/Users/Rog/AppData/Local/Temp/changeImage-3.html

    Are you using a Firefox extension like '''Auto Save Document ''' ? If you are using then you need to disable it. The documents are stored as html-text only (no embedded objects like pictures etc.) As a result the images don't appear on browser.

  • Why does browser download a file rather than displaying it?

    I am using a Nexus 7 device. I have a website locally on the device together with all of the data files. When I use the browser to select a file it does not need to download it. I want it to call up a list of the programs that can display the file so that I can select which app to use. When I leave that app then I expect it to go back to the browser and the HTML web page I was previou. sly viewing. It has done that at various times but has stopped now. How do I get it to resume displaying the files rather than downloading them onto the same device?

    I am using a Nexus 7 device. I have a website locally on the device together with all of the data files. When I use the browser to select a file it does not need to download it. I want it to call up a list of the programs that can display the file so that I can select which app to use. When I leave that app then I expect it to go back to the browser and the HTML web page I was previou. sly viewing. It has done that at various times but has stopped now. How do I get it to resume displaying the files rather than downloading them onto the same device?

  • Quick Time downloading mp3 file instead of streaming it

    When I click on an mp3 file on a webpage which normally streams, it now starts downloading instead of streaming. Using the latest version.

    Thanks for your help. Actually after my last post in saying it only happened in Firefox I had a further look in Firefox - Options - Applications - it showed that Quick Time default player was set to play mp3 files. I changed this to the Quick Time plug in and it worked. Thanks again.

  • Firefox 25 downloads aspx files instead of serving up sites thru Google search

    I used android 4.1.2 and just installed Firefox. when I attempt to connect to a website through a Google search link it downloads an aspx file which will not open. entering an address in the window works fine.

    That won't help, Waka.
    I would need to know what exact site is causing the issue to be sure. The likely cause of this is the site using an incorrect mime type such as a wap one when they actually serve html content.

  • When I clcik to download a pdf file the browser downloads the file but when adobe goes to open it I get often the message"There was an error opening this document. The root object is missing or invalid."

    I also have safari on my computer and if use it and go to the same website I can open the file. there is a similar message if I try to open the file with Preview.

    Sounds like the files are corrupt. Time to restore them from a good backup.

  • How do I get the Linux version of Firefox to allow me to download mp3 files instead of playing them in Firefox (the windoze solution doesn't work for Linux)?

    I've tried to modify a couple of "media" settings in about:config, but it still plays mp3s instead of allowing me to save them. In applications, mp3 audio is set to "Always ask".

    Did this behavior change after an update, or has it continued for several Firefox versions?
    Is there a visible player? If so, can you right-click it and see whether you get a plugin menu or a standard Firefox context menu?
    For some plugins, there is a separate configuration dialog to indicate which kinds of content they will handle (I recall QuickTime having such a dialog).

  • Opening downloaded pdf files using Adobe instead of in Safari

    I prefer to use full-feature Adobe software to view downloaded pdf files instead of Safari. How do I keep Safari from opening them in the browser and instead automatically open Adobe Reader when the search engine finds a pdf file?

    I have just installed Adobe Reader 9. I am getting frequent system hangs (cannot do anything without cold re-boot) when using the product, in particular when using forms documents provided by Companies House, a UK government agency.

  • Safari 5.1 downloads .pdf's instead of opening them

    Yesterday I upgraded to Safari 5.1 for my MacBook Pro running OS X 10.6.8. Now when I click on a .pdf file on a page in Safari, the file downloads into my Downloads folder and two additional windows open up plus the .pdf (one is a blank page, the other is the contents of the Downloads folder). Now for each .pdf I open, I have to delete it from my Downloads folder into the trash rather than simply closing the .pdf when I'm finished with it. Is there a way to reset this to the way it used to be?

    Hi Everyone,
    I'm having the same issue as reported by DocSarvis. I have never been using Adobe Acrobat on my Mac's - as the Preview plug-in for Safari have work perfect for me, that is until Safari 5.1.
    Some sites, the PDF file is viewed perfectly wihtin Safari, as with earlier versions of Safari, but other including my Bank, somehow tricks Safari to download the file instead of just viewing it as before upgrading Safari.
    Have anyone succeeded twiking Safari to view all PDF files from any sites - or do I really need to install the mention plug-in from http://www.schubert-it.com/pluginpdf/ - in order for Safari to work as before?

Maybe you are looking for

  • SuperDrive not working properly

    I have an '07 black MacBook (Macbook3,1) with a dysfunctional slot-loading SuperDrive. I put in a disk and I have to push it almost 7/8 of the way on before it accepts it. It spins for about 10 seconds before it spits it back out. I've tried using di

  • Problem with building conditional display items

    Dear All, Please help as I am using APEX for the first time. This my requirement during form dispaly in tabular format. There is one display item QA_TIER(not a database item). This item value is computed based on the condition below. I created a disp

  • Setup of Standby on Maxdb

    Dear All, I have to setup DR site using maxdb on Redhat Linux 5.4. On Primary  Server  and and Standby  Server Please advice     Hostname Should be same. Steps i will follow to setup DR site. 1.Backup copy from Production  server will be restore on T

  • How to make changes in HR Form using Form editor

    Hi, I am new to hr-abap..And I am working on HR form editor..and I wanted to generate a pay-slip using the hr forms..I had copied the standard form..and I am making the changes into that.. I want to add my own customization into it..like I wanted to

  • Need an efficient String searching algo

    Hi ! i'm in desperate need of the algorithm i hope some of you may already have it. actually i'm developing a chat application and i need to implement the functionality of inserting images on finding special tokens in the text..i'm using JTextPane an