ChanServ changed the topic of #picolisp to: PicoLisp language | Channel Log: https://irclog.whitequark.org/picolisp/ | Check also http://www.picolisp.com for more information
orivej has quit [Ping timeout: 245 seconds]
<freemint> I found out why css was not working, and i have a problem with http.l now
<freemint> The problem is that it generates links like http://xn--schg-noa:80.de/my.css for style-sheets and http://xn--schg-noa.de/ as base ref
ubLIX has quit [Quit: ubLIX]
<freemint> should uee https instead without any port hints
freemint has quit [Ping timeout: 268 seconds]
_whitelogger has joined #picolisp
_whitelogger has joined #picolisp
illo has joined #picolisp
orivej has joined #picolisp
_whitelogger has joined #picolisp
freemint has joined #picolisp
<freemint> Good Morning
<Regenaxer> Hi freemint
<freemint> Firefox complains about mixed content (a ssl website loading non ssl content which is why css does not work)
<Regenaxer> httpGate
<freemint> Before that it did not work because i told nginx accidentally that it can fetch images, css and js from a local folder, which it could no
<freemint> unless http_gate rewrites the html it would not fix the problem
<freemint> the problem is that the html says http://xn--schg-noa:80.de/my.css when it should https://xn--schg-noa.de/my.css
<Regenaxer> No, you dont need ":80" with httpGate
<Regenaxer> Anyway, I can't comment on Nginx usage
<freemint> nginx works i just talked about failure mode i had which exposed my current failure.
<Regenaxer> No idea, sorry
<freemint> My problem is that i am using http.l in a way that produces the "wrong link"
<Regenaxer> I would use httpGate, perhaps some other port if 80 or 443 is not free
<Regenaxer> There are no wrong links if you use pil/httpGate properly
<Regenaxer> It generates and translates all links and ports
<freemint> httpGate parses the complete html and rewrites all the ports?
<freemint> *links
<freemint> httpGate parses the complete outgoing html reply and rewrites all the links?
<freemint> Is that what you are saying?
<Regenaxer> No, the pil server communicates with httpGate
<Regenaxer> Read doc/httpGate.html
<freemint> the problem is that the html says http://xn--schg-noa:80.de/my.css when it should https://xn--schg-noa.de/my.css. Both urls provide the same content but due to a firefox policy on "mixed content" i can not have a http:// link to a stylesheet in a website that was delivered via https://
_whitelogger has joined #picolisp
<Regenaxer> Just point it to httpGate
<Regenaxer> Then use httpGate to start your pil servers
<Regenaxer> or start them yourself and give httpGate a local port
<Regenaxer> The normas setup is that httpGate listens on port 443
<freemint> hte encryption has to be handled by nginx using httpgate is impossible, since i have other services not running on picolisp.
<Regenaxer> Sorry, not my problem
<Regenaxer> afp
<freemint> Why do '^ and (baseHRef) have almost the same code?
<freemint> and why is ^ never called?
<freemint> Forget the comments about ^ for some reason ^ appeared in (who '*Gate)
<freemint> Solved my problem: the most helpfull answer would have been. http.l and xhtml.l are only expected to handle ssl if they are talking with HTTPgate. You can emulate that by setting '*Gate to "https" in the main.l and redefine baseHRef (which is the the place involved with generating all urls) so that you come into problem with the *Gate style domain.tld/port/request
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
freemint has quit [Remote host closed the connection]
freemint has joined #picolisp
<freemint> *Gate is set indirectly by httpGate (i assume by looking at the forwarded http request)
<freemint> and the header/cookies
freemint has quit [Ping timeout: 240 seconds]
freemint has joined #picolisp
<freemint> Regenaxer, let me compliment, your software is supremely debuggable if you have a hunch how it works and of it's principles
ubLIX has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
freemint has joined #picolisp
orivej has quit [Ping timeout: 245 seconds]
razzy has quit [Ping timeout: 255 seconds]
freemint has quit [Ping timeout: 240 seconds]
freemint has joined #picolisp
ubLIX has quit [Quit: ubLIX]
orivej has joined #picolisp
<Regenaxer> ret
<Regenaxer> In fact http and xhtml don't handle ssl at all, they are not aware of it except for a single case, the *Gate variable
<Regenaxer> So it seems you found the right place
<Regenaxer> But I still believe the best would be to start httpGate, perhaps on another port and connect that from nginx (though, as I said, I have no clear idea of what nginx does)
<Regenaxer> httpGate always appears as a server on a single port to whoever connects to it
_whitelogger has joined #picolisp
<freemint> Regenaxer, can i force httpGate to tell via *Gate that it is using https even when i access it over port 443 only?
<Regenaxer> Hm, this is the normal case, no?
<Regenaxer> httpGate does not care of the port number
<Regenaxer> If a cert is passed, it uses ssl
<Regenaxer> otherwise no encryption, no matter which ports is given to listen at
<Regenaxer> Can't you start eg. bin/httpGate 1443 names pem.key,pem.crt ?
<Regenaxer> then forward from nginx to 1443 somehow
<Regenaxer> Or ignore nginx completely, open 1443 in the firewall, and use https://myserver:1443/app
<Regenaxer> I have that on a customer's machine. 3 httpGates, listening on 80 (for letsecrypt only), 443 (normal usag) and 2xxxxx (for a separate setup)
razzy has joined #picolisp
<freemint> mhh looks like the easiest solution is to have a self signed certificate to feed httpGate and let nginx handle the let's encrypt certificate.
<freemint> (with my setup of virtual hosts who run non picolisp software depending on path filterting for security.
<Regenaxer> Hmm, cert is an issue, yes. Self-signed is not so nice indeed
<freemint> nginx does not check certs when it is proxying hosts on local network.
<Regenaxer> Seems like you need a separate domain for Let's encrypt? I never thought about it
illo has quit [Quit: WeeChat 2.2]
<freemint> You need a publicly accessable domain
<Regenaxer> yes, thought so
<freemint> I could construct a vodoo setup with reusing a cert i created publically for local network but that makes everything even more complicated
<Regenaxer> I also used some self-signed certs years ago, but that was no longer needed
<freemint> the self signed would only be visible internally nginx would make everything look let's encrypt on the outside.
<Regenaxer> So your solution of setting '*Gate to "https" is OK
<Regenaxer> I did not think baseHRef needs to be redefined
<freemint> It needs because *Gate implies => domain.tld/Port/query
<Regenaxer> yes, but thats needed
<Regenaxer> Port is handled by httpGate
<freemint> nut it even does that for port 80
<freemint> picolisp server gets schäg.de/80/!aboutme
<Regenaxer> But I *do* use it this way
<freemint> and complains that accessing 80/ is not in allowed
<Regenaxer> 80 is never involved
<Regenaxer> I use 2xxxxx
<Regenaxer> bin/httpGate 2xxxxx names certs
<freemint> mhh i look into it but self signed is the easier solution
<Regenaxer> users connect to https://host:2xxxx/foobar
<Regenaxer> neither 80 nor 443 is involved
<Regenaxer> yes, if you cannot read-acces the nginx cert
<Regenaxer> but perhaps you can?
<freemint> I can't proper isolation, also cert would be for the wrong domain not the internal 10.0.2.2 but for schäg.de
<Regenaxer> I thought you *want* to access from outside
<Regenaxer> -> schäg.de
<Regenaxer> For internal access self-signed is ok
<Regenaxer> So this one really does not work? bin/httpGate 2443 names /path/to/letsencrypt/certs
<freemint> Regenaxer, i try later but the picolisp vm is 10.0.2.2 and not schäg.de
alexshendi has joined #picolisp
<Regenaxer> ok
<Regenaxer> then self-signed. LetsEncrypt does not work with IP-addresses
<freemint> I am sorry i took so long for to explain the circumstances properly
<Regenaxer> no problem
<Regenaxer> what I told above was also wrong
<Regenaxer> The customer setup on a third port works only in LAN
<Regenaxer> I just tried. I runs since many years and I forgot the details
<freemint> the reason why i do not go with the port option is schäg.de is because schäg.de is supposed to be my homepage and a schäg:88.de would be weird.
alexshendi has quit [Read error: Connection reset by peer]
<freemint> anyway Regenaxer debugging the "wrong" urls was a bliss in picolisp. i never realized the potential of ! until i ran it with the webserver running and could inspect anything
<Regenaxer> Thanks, glad to hear :)
<freemint> it was quiet fun to "write" html code for a running session
DerGuteM1ritz has left #picolisp [#picolisp]
DerGuteMoritz has joined #picolisp
ubLIX has joined #picolisp
freemint has quit [Ping timeout: 240 seconds]
freemint has joined #picolisp
rcs_ has joined #picolisp
freemint has quit [Ping timeout: 250 seconds]
orivej has quit [Ping timeout: 245 seconds]
freemint has joined #picolisp
razzy has quit [Ping timeout: 250 seconds]
rcs_ has quit [Quit: Leaving]
_whitelogger has joined #picolisp