DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 17th July 2021
CiotBSD CiotBSD is offline
c107:b5d::
 
Join Date: Jun 2019
Location: Under /
Posts: 175
Default [6.9] nut-cgi && httpd (+slowcgi)

Hi.

I attempt to use nut-cgi with httpd server, on OpenBSD 6.9.
(for the little story, I've an Eaton Ellipse ECO 650 USB FR; it's recognized and seems run correctly with the OS, after the pretty configuration…)

My file config /etc/nut/ups.conf:
Code:
[eaton]
	desc = "Eaton Ellipse ECO 650 USB FR"
	driver = "usbhid-ups"
	port = "auto"
	vendorid = "0463"
	productid = "FFFF"
	product = "Ellipse ECO"
	serial = "000000000"
	vendor = "EATON"
	bus = "005"
----

I changed rights user on the script CGI /var/www/cgi-bin/nut/upsset.cgi to "www:bin":
Code:
-rwxr-xr-x  1 www   bin     2499656 Apr 19 23:29 upsset.cgi*
My basic config httpd:
Code:
types {
    include "/usr/share/misc/mime.types"
}

server "default" {
    listen on 127.0.0.1 port 80
    log { access "httpd-default-access.log", error "httpd-default-error.log" }
    location "/cgi-bin/*.cgi" {
        fastcgi socket "/run/slowcgi.sock"
        root "/"
    }
}
(after, both services httpd and slowcgi are enabled and started)

I created the file '/etc/nut/hosts.conf':
Code:
MONITOR eaton@localhost "Eaton Ellipse ECO 650 VA USB FR"
I uncommented the mention "I_HAVE_SECURED_MY_CGI_DIRECTORY" on the file /etc/nut/upsset.conf:
Code:
$ grep -v '#' /etc/nut/upsset.conf                                                                                                            

I_HAVE_SECURED_MY_CGI_DIRECTORY
(all services upsd, upsmon, httpd was been restarted…)

But, when I consult the CGI script, I had always the error message:
Quote:
Error: Secure mode has not been enabled in upsset.conf.
Refusing to start until this is fixed.
Any idea/suggestion?
(perhaps, it's not possible to use the nut cgi scripts with httpd; those scripts are wrote for Apache, by default)
__________________
GPG:Fingerprint ed25519 : 072A 4DA2 8AFD 868D 74CF 9EA2 B85E 9ADA C377 5E8E
GPG:Fingerprint rsa4096 : 4E0D 4AF7 77F5 0FAE A35D 5B62 D0FF 7361 59BF 1733

Last edited by CiotBSD; 17th July 2021 at 01:20 PM.
Reply With Quote
  #2   (View Single Post)  
Old 17th July 2021
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,984
Default

Per the package description, cgi-nut is implemented specifically for chrooted Apache, as you noted.

You may want to post to the ports@ mailing list, as cgi-nut does not have a port maintainer assigned and this forum is a tiny community.
Reply With Quote
Reply

Tags
httpd, nut-cgi, openbsd


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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating the "vi /etc/httpd.conf", httpd -n, rcctl restart httpd" treadmill J65nko Guides 0 18th May 2021 12:58 AM
[httpd+slowcgi] Script SGI : for static file CiotBSD Programming 2 15th May 2020 06:09 PM
httpd in a vm on a firewall thefronny OpenBSD Security 1 27th January 2019 03:08 PM
cms for httpd psypro OpenBSD General 1 9th August 2016 08:51 PM
New httpd and PHP morophla OpenBSD Packages and Ports 21 31st August 2015 09:54 PM


All times are GMT. The time now is 10:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick