v_m_v has quit [Remote host closed the connection]
clacke has quit [Remote host closed the connection]
v_m_v has joined #picolisp
v_m_v has quit [Remote host closed the connection]
<Nistur>
alright, time to do more of this "website" stuff
<Nistur>
Regenaxer: another quick annoying question - how does httpGate work, the first field - can I put a domain in there? I've been setting up philippgeyer.co.uk but I was considering nistur.com to the same server, although with a different site. If I put nistur.com at the start of a line in names, does that 'just work'
<Nistur>
?
<Regenaxer>
httpGate works strictly locally
<Regenaxer>
it has no idea of domains
<Regenaxer>
The name in the first column is translated to the port in the second
<Nistur>
ok, so there's no way I could get one server to host two different pil sites on two different domains?
<Regenaxer>
I think you can do what you want
<Regenaxer>
for example, picolisp.com and 7fach.de are operated by one single httpGate process
<Regenaxer>
also tcgfpulse.com and pulse.tcgfsupplychain.com
<Regenaxer>
The outsi
Regenaxer has left #picolisp [#picolisp]
Regenaxer has joined #picolisp
<Regenaxer>
oops
<Nistur>
:D
<Regenaxer>
the outside hostname does not matter
<Nistur>
I thought I'd scared you off with my stupid question :P
<Regenaxer>
nope, a Penti mistype ;)
<Regenaxer>
so if you have philippgeyer.co.uk
<Nistur>
so they're running on the same server at, say, 8080?
<Regenaxer>
This translation is done by the "default" server in the "@" line
<Nistur>
hmmm, what I was hoping was that httpGate I'd have two entries, one would be, say, @ 8080 web /home/web/sites/philippgeyer.co.uk... and then the next would be nistur.com 8081 web /home/web/sires/nistur.com
<Nistur>
s/sires/sites/
<Nistur>
so if you'd try to load nistur.com it would connect to the server at 8081, which is hosting from /home/web/sites/nistur.com and otherwise the fallback is to load my current site
<Regenaxer>
What does 8080 mean? The port httpGate is listening at?
<Nistur>
good question, I just copied that from the beginning of my names file
<Nistur>
I assumed it was the port, but you're right, the port is --server 8080 at the end
<Regenaxer>
It should listen at 80 or 443
<Regenaxer>
yes
<Regenaxer>
I usually start one at 443 or two at 80 and 443
<Regenaxer>
then the local ports don't matter
<Regenaxer>
I start at 2000 and go upwards for every application
<Nistur>
yeah, the ports don't matter
<Nistur>
I just used 8080 from the example
<Regenaxer>
good
<Nistur>
I have two httpGate instances, at 80 and 443
<Regenaxer>
Perfect
<Regenaxer>
so the domain names dont matter here
<Regenaxer>
if you want to map to different apps depending on the domain, then write a little frontend
<Regenaxer>
As you see, the dispatch server looks at the *Host global
<Regenaxer>
(let Dom (mapcar lowc *Host)
<Regenaxer>
then it strips off "www" and looks into the *DNST idx tree to find the app
<Regenaxer>
(redirect (caar @))
<Nistur>
ok, I think I understand your thing, you're doing a redirect, so going to phone.picolisp.com will redirect to https://picolisp.com/phone, and I'd have to figure out how to, rather than redirect, point it at a different root
<Regenaxer>
What do you mean with "root" here? Another root server (hardware)#
<Regenaxer>
Would be no problem
<Regenaxer>
We could redirect phone.picolisp.com to nistur.com/foobar
<Nistur>
no, I just want two instances of pil running, one with the cwd in /home/web/sites/nistur.com hosting that site, then one in /home/web/sites/philippgeyer.co.uk hosting that one, and then some way for it to map the domain to those two servers... so how about... I create a third one which is the @ and I put the other two as apps under nis/ and phg/ respectively, then the @ decides, rather than redirecting
<Nistur>
like yours does, to proxy to the ports they're running on?
<Regenaxer>
this main.l does not handle ports, just domains
<Regenaxer>
the ports are then handled by httpGate
<Regenaxer>
eg. phone to 2010 or so
<Nistur>
yes, so when main.l gets a request for nistur.com/test it goes "right, do a request to 127.0.0.1:8081/test, and send that back instead"
<Regenaxer>
you can throug out some stuff from that main.l
<Regenaxer>
ogging stuff
<Regenaxer>
yes, this should do too
<Nistur>
I could even load names and, if I use the domain as the app name, then can use the same data to do the lookup. Hrmmm
<Regenaxer>
right
<Nistur>
thanks :) I think I know what I need to do, I'll not do it yet, I still need to write more content for my first website, but hopefully I should get most of that done in a couple of days, and I can have a poke at this
<Regenaxer>
great :)
<Nistur>
I'll probably have more dumb questions when I try it :D But at least I now know what I want to do properly
<Regenaxer>
Please ask, no problem!
<Regenaxer>
It is also good for me to dig out this old stuff
<Regenaxer>
I did it years ago and did not think about it any more
<Regenaxer>
I just noticed that main.l and the dns file is less and less used
<Regenaxer>
I told all new users to do 7fach.de/name
<Regenaxer>
instead of name.7fach.de
<Nistur>
:)
<Nistur>
I am beginning to think that maybe I shouldn't write a few paragraphs on every project I've worked on :P
<Nistur>
(also, while I'm technically not using much more than the most basic functionality of the webserver, I've still put it at the top of the list of credits :P https://philippgeyer.co.uk/credits.html )
<Regenaxer>
I think this is fine the way it is
<Nistur>
This is meant to be an extension of my CV, so the CV has a brief list of all the projects, this is just for if a prospective employer wants to know more about what I did on those projects. I used to have this on nistur.com and it led to far more enjoyable interviews...
<Regenaxer>
ah, I see
<Regenaxer>
yeah, then better keep it concise
<Nistur>
yup, that's the plan :P I'm trying my best. Some projects I'm struggling to say more than a couple of sentences, some I'm struggling to stop writing :P