libera/#devuan/ Thursday, 2024-07-04

onefangI'm looking at switching from apache to nginx, or at least trying it out.  The nginx wiki says you can combine SSL and non SSL in the same server block.  The examples says don't do that!  I want to NOT have to duplicate everything if they have to be seperate server blocks.  Anyone got clue?12:25
onefangOr I guess I could split out the common bit into an include file.12:25
djphonefang: fairly certain it's the same idea as apache -- you've got a listener on 80 and 443 ...12:26
onefangYes, I know that.12:27
djphAlthough these days I've just got the listener on 80 redirecting to 443, rather than serving anything itself12:27
onefangWhat I want to do is have both configured identically, without having to actually duplicate the config.12:27
onefangSoooo web site says I can do that, the example says not to.12:28
djphsounds about right ... "just because you can doesn't mean you should" and all that ..12:28
onefangI'll try the split and include method for now I think.  I'm not ready for SSL testing yet anyway.12:30
onefangMight just be that they fixed that bug in the version documented on the web site, but the fix isn't in Daedalus.12:33
djphcould be12:34
onefangAh there's a snippets directory that looks like it's for this sort of random include file.12:35
djphnice :)12:35
rwponefang, If you are still looking for Nginx examples I can furnish several working ones from my collective.17:58
onefangI'm slowly making progress with it, but it's 2 AM now.  I'll look into it more tomorrow.17:59
onefangCurrrently having trouble with running cgit under nginx.  The links wont go anywhere.18:00
onefangNginx is a big complex beasty, will take some time to tame it.  Only started this arvo.18:00
onefangBut it seems you CAN just put both ports in the one server section.  B-)18:01
rwponefang, Here is a simple complete example: https://paste.debian.net/plain/132231218:27
rwpCompared to Apache configuration Nginx is much simpler.  That's one of the reasons I prefer Nginx because Apache is really convoluted by comparison.18:28
onefangI haven't gotten to Let's Encrypt yet, but I did spot an example using the default self signed cert that's generated at system install time.18:29
rwpIf you don't have a valid certificate yet then strip out all of the 443 and ssl lines.18:30
onefangI read some reviews and comparisons, one of my big use cases is my Devuan mirror.  Pure static content and lots of it.  Nginx should improve things for that.18:30
rwpAnd that is the way to bootstrap a Domain Validation cert too.  Start with just http online.  Get a DV cert through Let's Encrypt.  Then add in the ssl configuration for the cert and enable https.18:30
onefangSnakeoil cert is fine for just testing on my desktop.18:30
rwpOne of the abuses suffered on the net these days is a Slow HTTP attack where clients connect or half connect and then just hang onto the server trying to run it out of process slots.18:31
rwpThat attack really grinds up Apache.  But Nginx seems to hardly notice.  That's another reason Nginx is a preferred server.  It can just shrug off a lot of attacks.18:32
* onefang thanks you and goes back to relaxing. Sleep might happen.18:34
rwpTo run CGI scripts everyone I know uses the FastCGI daemon.  But while that is simple to set up small it is a little confusing to set up for a larger production network facing system.  Given your late hour I won't say how I configure it here but chat with me when you are awake and I will descript the setup.18:34
onefangThink you have covered the bits I already figured out.  B-)18:35
onefangJust getting it to work with cgit is proving tricky.  Slowly made progress though.18:36
rwpcgit?  Let me paste you a working configuration...18:36
onefangOK.  Not actually sleepy anyway.  lol18:36
rwpcgit configuration: https://paste.debian.net/plain/132231418:37
onefangNot much different from what I figured out, but a few things I haven't seen before.18:38
* onefang tries it.18:38
rwpThat will push you into using fcgiwrap spawn-fcgi multiwatch pretty much immediately.18:38
onefangI was already using spawn-fcgi for a previous project, but under Apache.18:39
onefangI see /home/rwp/tmp/cgit-stuff/cgit-1.2.3+git2.25.1/cgit I'm guessing you compiled your own?18:41
rwpHmm...  paste.debian.net is complaining my next paste is a spam for some reason.  Grr...18:41
rwpYes.  You can see the packaged version is commented out.  I was testing a newer version.18:42
onefangWorks after a quick test.  Thanks again.18:44
rwpHere is a full production configuration that includes various other tidbits too. https://www.proulx.com/tmp/cgit.savannah.gnu.org.conf.txt18:44
rwpI don't know why paste.debian.net did not accept it.18:44
onefangThink the only other thing I need is to get it to run PHP, which sounds easy enough.18:44
onefangWhich was a definite tomorrow task.18:45
rwpHere is a RoundCube PHP example for Chimaera: https://paste.debian.net/plain/132231618:46
rwpFor Daedalus the PHP version numbers update of course.18:46
onefangI'll look at that later.  Thanks again.18:47
rwpI'll just note that the default Debian package starts 1 fcgiwrap daemon by default.  That's not enough to keep up with a busy site.  Increase FCGI_CHILDREN=10 or whatever you wish in /etc/default/fcgiwrap to run more children.  The "multiwatch" daemon will monitor and start these.18:52
rwpOn Devuan this should just work.  On Debian with systemd this does not just work and to make it work one must create a local systemd override fcgiwrap.service file.  On Devuan you won't need it but if anyone needs it for a systemd system please mention it and I will post what I have done for it.18:54
freemHi. I am trying to setup coredump generation for a program running under runsvdir's supervision. So far, I tried adding "ulimit -c unlimited" in the run file itself, modifying /proc/sys/kernel/core_pattern to "/var/dumps/%e-%p-%s-%t.core" as root (and ensuring the folder exists), or "| cat - > /var/dumps/%e-%p-%s-%t.core", setting /proc/sys/kernel/core_uses_pid to "1"... without any success19:04
freemthat VPS is currently running under Debian, but is not using systemd, so I'm asking for just the regular kernel stuff, not something specific to any program... I suppose?19:06
freemI tried asking that on #debian, but got the answer that most people there use systemd (which is true, I guess, and makes sense, since it's distro's defaults).19:07
rwpfreem, That seems like it should work.19:07
freemwell, I usually try reading doc before bugging people on IRC :)19:07
rwpAnd yes I have given up talking with most of the Debian community.  They have lost the title that we always loved of being the Universal Operating System.  Not anymore.19:07
rwpLet me try a test here and see if I can reproduce a core dump.  It's been a while.19:08
freemit's sad, because this is kernel stuff and directly _un_ related to systemd19:08
rwpWhich release are you running?19:08
freemstable, but lemme double check19:08
freemyes, bookworm, although the kernel is a bit out of date19:08
rwpRight.  Not related to systemd at all.  But unless you are wearing the same robes they are then they won't even entertain a discussion and will bark at you the entire while.19:08
freemno, I was just ignored19:09
freemand when I re-asked, I got the answer "most of us use systemd"19:09
rwpDebian Bookworm without systemd?  Or Devuan Daedalus?  I will get onto my correct test system if I know.19:09
freemI would have had this answer earlier, I'd probably have thought about asking somewhere else earlier, as well19:09
freembookworm19:09
freemI've been using debian since a while, when I tried devuan it was a bit... rough on the edges :)19:10
freemand I never used systemd19:10
freemwell, I did... for 3 months or so.19:10
rwpThen you are okay in my book. :-)19:10
rwpLiterally I did nothing more than "ulimit -c unlimited" then "sleep 30" and Control-\ to send it SIGQUIT and it dumped a "core" file okay.19:10
freemI tried, because I was curious. I noticed it added nothing useful so went back. I was on the mailing list at that time, and noticed people talking about runit, so gave it a try. I fell in love.19:11
freemthat was before devuan's birth19:11
rwpDevuan fully supports init freedom and we love runit too.19:11
freemyeah, that is what I'd expect, but I'm wondering if runit does not modifies some stuff19:11
freemas per the documentation, coredumps might not be generated if UID change or something19:12
freemwell, I have also tried voidlinux19:12
freemturns out my runit-scripts are more... err... unadvanced than the stuff I've found :)19:12
freemhttp://deadbeef.fr/projects/autoinst/files.html that's the stuff I wrote myself a long while ago, works nicely for me.19:13
rwpI changed /proc/sys/kernel/core_pattern to /var/dumps/%e-%p-%s-%t.core as you described.  I started "sleep 30".  I pressed Control-\ and sleep dumped core to /var/dumps/sleep-14509-3-1720113175.core no problem.19:13
freemhttp://deadbeef.fr/projects/autoinst/file/etc/runit/log.run.html and http://deadbeef.fr/projects/autoinst/file/etc/runit/common.html being the core of my systems19:13
freemyou did that with a program running under runsv?19:14
rwpVoid has been running runit as their main system for some time and therefore Void has become the ad-hoc reference platform for runit for most of us.19:14
freemperhaps the program I'm trying to run does a weird thing then19:14
rwpI did this from the command line as a test.  Start small.  Debug one simple thing.  Move to the next more layered thing.19:14
freemwell, I've found that voidlinux didn't even had logging easy to enable19:15
freemthat's a while ago though19:15
freemme, I just ln -s this log.run into foo/log/run and I'm done :)19:15
rwpVoid is a rolling release model.  Good for the desktop.  Not good for servers.  Mostly I deal with servers.  Stable releases are best for servers.19:15
freemlog folders are created, based on the name of the service, automatically. No need for config or anything19:15
freemI'm too lazy to bother writing config for every daemon to log :D19:16
rwpAre you able to reproduce a core dump on demand from the command line like this too?  Or does it fail for you at that step?19:16
freemlemme checj19:16
rwpAlso make sure your /var/dumps directory is mode drwxrwxrwt which might be the problem.  chmod a+w,+t /var/dumps19:16
freemok... it seems it worked19:18
freemI'll try killing the process under supervision now19:18
rwpGood!  Because I don't actually have a running test case that is working for runit at this moment.  I would need to build one up.19:18
freemI didn't had the 777 perms19:19
freemdang... got users -.-'19:19
rwpThat will definitely block it from working.  Be sure to add +t too.19:19
freemI had no user on this game server the whole day, now I need to test and... there are!19:19
freemcursed users19:19
rwpcursed users19:19
freemwithout users, no bug reports, too19:19
freempeace19:19
freemwell, I'll just wait and give it a try :)19:19
freemwhat's the +t?19:20
rwpFor directories that are mode 0777 wide open the 't' bit is a security restriction that limits what users can do there.  Look at the t bit on /tmp and /var/tmp for example.19:20
rwpI don't have a doc reference immediately but I'll see if I can find one.19:20
freemI'll find one, I'm curious about this security19:21
rwpI found this which seems acceptable https://linuxconfig.org/explaining-the-sticky-bit-what-the-t-in-linux-directory-permissions-means19:23
freemah, the sticky bit19:24
freemyeah I got this https://www.unix.com/tips-and-tutorials/19060-unix-file-permissions.html19:24
freemnot perfect, but I don't really need in depths explanations of things to get the bulk19:24
freemthanks, that is useful19:25
rwpIt's being repurposed for this on directories.  Originally on executables it meant to keep it in RAM and don't swap it out.  And had no meaning on directories.  So when they needed a new capability for directories it was pressed into service as a hack.  And here we are with it all of these years later.19:25
freemit's how temporary solutions behave19:26
rwpAnd the original purpose of it just doesn't make sense anymore, and probably does nothing, because the entire memory model has changed since them.19:26
rwpNothing is a permanent as a temporary solution.  Or at least a temporary solution which is working.19:26
freemyes19:27
rwpSo to summarize the problem you experienced was that the specified core dump directory did not have the correct permissions.  Solved now.  Yay! :-)19:27
freem"if it ain't broken, don't fix it" is sadly... or perhaps not?... a strong mantra19:27
freemyes19:27
freemwell, that is likely19:27
freemI'll try to setup the whole thing, but at least having coredumps working for normal processes is a good start19:28
rwpSince this is the Devuan support channel we just like to keep things on topic here.  But please come join us in #devuan-offtopic for other idle chat!  It's a friendly place.  And we can discuss other random things there.19:28
freemsure :)19:29
freemwhy not I guess19:29
fsmithredfreem, if you ask a runit question on the devuan forum there's a good chance the runit maintainer (Lorenzo) will reply. dev1galaxy.org19:34
freemI'll keep this in mind19:35
sciphello, I have installed Daedalus and updated it today. However, it has still openssh 9.2 installed. How can I go to the latest openssh version 9.8 in order to patch against CVE-2024-6387?23:56

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!