The web in a box - a next generation web framework for the Perl programming language

IRC log for #mojo, 2017-02-24

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
00:00 Grinnz Fallout 4 suffered from the usual bethesda quirks, but otherwise was a real nice game
00:00 dave yeah it's just...master of orion got in the way
00:00 dave I love that game
00:01 dave I still have a runnable copy of moo2 from the 90s
00:03 ashimema joined #mojo
00:26 Janos_ joined #mojo
00:41 itaipu joined #mojo
00:51 aborazmeh joined #mojo
00:56 Grinnz https://blog.cloudflare.com/incident-report-on-memory-leak-caused-by-cloudflare-parser-bug/
01:16 blonewolfs joined #mojo
01:54 blonewolfs joined #mojo
01:55 mcsnolte joined #mojo
02:28 marty joined #mojo
02:41 miller joined #mojo
02:46 miller Is it possible to increase the inactivity_timeout (https://metacpan.org/pod/Mojo::Server::Hypnotoad#inactivity_timeout) for a specific endpoint?
03:25 noganex_ joined #mojo
03:50 lluad joined #mojo
05:04 dboehmer joined #mojo
05:23 stryx` joined #mojo
06:20 preaction miller: yes: $c->inactivity_timeout(...)
06:26 kes joined #mojo
06:33 inokenty-w joined #mojo
07:31 mrtrump joined #mojo
07:31 mrtrump hi
07:31 mrtrump hows the mojo?
08:01 Vandal joined #mojo
08:11 AndrewIsh joined #mojo
08:42 trone joined #mojo
08:55 kaare joined #mojo
09:16 CHYC joined #mojo
09:16 rshadow joined #mojo
09:32 stryx` joined #mojo
09:32 genio joined #mojo
09:32 mattp_ joined #mojo
09:32 jlaffaye joined #mojo
09:32 jabberwok joined #mojo
09:32 mishanti1 joined #mojo
09:32 schelcj joined #mojo
09:32 msestak joined #mojo
09:32 mat joined #mojo
09:32 Obbi joined #mojo
09:32 mbudde joined #mojo
09:32 mpapec joined #mojo
09:32 Eke joined #mojo
09:32 jesk joined #mojo
09:32 plicease joined #mojo
09:32 xdg joined #mojo
09:32 sawtooth joined #mojo
09:32 litwol joined #mojo
09:32 jacobydave joined #mojo
09:32 purl joined #mojo
09:32 yuni joined #mojo
09:32 suede joined #mojo
09:32 jnap joined #mojo
09:32 hahainternet joined #mojo
09:32 cromedome joined #mojo
09:32 meredith joined #mojo
09:32 da5id joined #mojo
09:32 Phil21 joined #mojo
09:32 matt__ joined #mojo
09:34 sri this is ridiculous, i've not really been sick in years, but of course i catch a cold during hackweek...
09:34 mrtrump was kicked by sri: mrtrump
09:35 haarg joined #mojo
09:42 * sri sneezes
09:50 dtj joined #mojo
09:51 irqq joined #mojo
10:04 sugar joined #mojo
10:37 New2Perl joined #mojo
10:41 New2Perl hi everyone, I'm new to mojolicoius, coming from a traditional CGI background. Really loving it so far, but I have a question about integration with webserver. I have several apps/sites, currently under apache they just run as normal apache sites with execCGI. Is there a guide or best practice for hosting multiple Mojolicious apps/sites under one a
10:41 New2Perl pache webserver? Thanks in advance
10:43 nic New2Perl: It's very straightforward.  The simple way is to run each app in its own app server (usually hypnotoad).  Then it's just a matter of directing from apache (or whatever reverse proxy you like) to the appropriate port per app
10:44 nic Further than that depends on whether your apps are served on separate ips, virtual hostnames, or path prefices, but that's really about apache
10:45 lari joined #mojo
10:46 New2Perl nic: thanks, currently I have one mojo app running along side my standard CGI stuff, understandably I want to replace these over time with mojo based versions :) I am using reverse proxy. All sites run on the one IP, under the same root path. I was wondering if there is a clever way to manage the multiple hypnotoad instaces
10:48 nic I have each one at a separate fs path, saving its pid into its own file, along with a start/stop script (which I shall soon migrate to a systemd script)
10:49 New2Perl nic: I'm solaris based, do you know of a sane way to start hypnotoad instances on boot?
10:51 nic Now, some people mount multiple child apps within one parent app [hypnofarm is worth a look].  That may simplify the OS-admin side, but does complicate the logic of each child app and slightly constrains what they can do
10:51 nic It's many years since I worked on Solaris.  What is their standard way to start services?  init.d?
10:52 nic Whatever the standard way is, you can adapt it to start hypnotoad
10:52 nic start/stop/status
10:52 nic .../reload (the best of all)
10:54 batman nic, New2Perl: you don't have to mount multiple apps. if you start toadfarm with just one app, it will just use toadfarm to change the config of the app, but no extra overhead.
10:55 batman we use toadfarm at work just because of the init-v features.
10:55 batman $ /etc/init.d/app [start|stop|restart|reload]
10:56 nic yeah, I meant look at toadfarm as an alternative, not for mounting sub-apps
11:11 sugar joined #mojo
11:12 New2Perl batman: thanks, I'm confused by some of the terminology. I'll have a play around with toadfarm.
11:16 ashimema joined #mojo
11:34 stryx` joined #mojo
11:34 rshadow joined #mojo
11:42 itaipu joined #mojo
12:13 itaipu_ joined #mojo
12:33 bc547_ joined #mojo
12:37 bc547 joined #mojo
12:47 good_news_everyon joined #mojo
12:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJOJ
12:47 good_news_everyon mojo/master f8a0eaf Sebastian Riedel: support http+unix:// for proxy servers too
12:47 good_news_everyon left #mojo
12:48 sri socks+unix is too complicated, since i can't reuse https://github.com/kraih/mojo/blob/master/t/mojo/user_agent_socks.t#L48
12:49 sri and i finally got around to putting the inlined CONNECT proxies into a single shared library
12:58 sri omg https://github.com/pirate/sites-using-cloudflare/blob/master/README.md
12:59 sri time to change passwords
13:02 aborazmeh joined #mojo
13:05 itaipu joined #mojo
13:46 good_news_everyon joined #mojo
13:46 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJcr
13:46 good_news_everyon mojo/master 4981122 Sebastian Riedel: show UNIX domain sockets in command examples
13:46 good_news_everyon left #mojo
13:47 good_news_everyon joined #mojo
13:47 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJcH
13:47 good_news_everyon mojo/master 583ac6a Sebastian Riedel: the get command supports UNIX domain sockets too
13:47 good_news_everyon left #mojo
13:58 marty_ joined #mojo
14:01 good_news_everyon joined #mojo
14:01 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJWB
14:01 good_news_everyon mojo/master 75fae32 Sebastian Riedel: mention UNIX domain sockets in the cookbook too
14:01 good_news_everyon left #mojo
14:05 good_news_everyon joined #mojo
14:05 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJWh
14:05 good_news_everyon mojo/master c74b998 Sebastian Riedel: include Mojo::IOLoop too
14:05 good_news_everyon left #mojo
14:07 good_news_everyon joined #mojo
14:07 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJl3
14:07 good_news_everyon mojo/master 0ede7ae Sebastian Riedel: mention the path too
14:07 good_news_everyon left #mojo
14:08 sri that should get the job done http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#UNIX-domain-sockets
14:16 gryphon joined #mojo
14:20 gizmomathboy joined #mojo
14:22 stryx` joined #mojo
14:28 sugar joined #mojo
14:33 sri review time https://github.com/kraih/mojo/compare/v7.26...master
14:33 sri if anyone feels like helping out
14:41 sugar joined #mojo
14:42 genio sri: in IOLoop.pm line 393, the grammar bothers me a bit. I think it should read "Opens ... connections ..."
14:42 genio sorry, I can't really be of much help on the technical review part
14:44 genio My suggestion would make it roughly the same as    IOLoop/Client.pm line 210
14:44 sri that's inconsistent
14:45 sri see IOLoop.pm context
14:46 genio Ah, you're talking to the person more.  Then connections should still be pluralized
14:46 genio or   Open a
14:47 genio Open a ... connection with       or    Open ... connections with
14:51 red joined #mojo
14:56 genio sri: The rest of the verbiage reads well (minus one other minor thing at the end of a sentence).  "reached" should be "reaches" or "has reached" in IOLoop/Delay.pm on line 240.
14:58 good_news_everyon joined #mojo
14:58 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://git.io/vyJzc
14:58 good_news_everyon mojo/master 08bbd11 Sebastian Riedel: fix typos
14:58 good_news_everyon left #mojo
14:59 sri btw. i found another syntax for declaring unix domain sockets
14:59 sri https://h2o.examp1e.net/configure/proxy_directives.html
14:59 sri http://[unix:/path/to/socket]/path
14:59 sri that's not actually a valid URL though
15:08 good_news_everyon joined #mojo
15:08 good_news_everyon [mojo] kraih pushed 1 new commit to master: https://github.com/kraih/mojo/commit/a0cb00f131658e95073f62872a369ddb086c1f48
15:08 good_news_everyon mojo/master a0cb00f Sebastian Riedel: show how to pass along a hostname
15:08 good_news_everyon left #mojo
15:16 batman looks like an invalid ipv6 url, hehe
15:17 tyldis Only in Postfix
15:26 PopeFelix is purl a bot?
15:26 genio yes
15:26 PopeFelix ahhhhh
15:26 genio she's a good bot, though.
15:26 purl thanks genio :)
15:26 * genio pets purl
15:26 * purl purrrrrs
15:27 * PopeFelix offers purl a fishie
15:27 PopeFelix OK, so not based on MaxCat from #callahans back in the day... :)
15:35 lluad joined #mojo
15:39 stryx` joined #mojo
16:01 gregf_ joined #mojo
16:16 sugar joined #mojo
16:21 mcsnolte joined #mojo
16:24 sugar joined #mojo
16:46 suede joined #mojo
16:50 geheimnis` joined #mojo
16:54 stryx` joined #mojo
16:56 miller joined #mojo
17:27 itaipu joined #mojo
17:28 bwf joined #mojo
17:58 rshadow joined #mojo
18:02 bwf joined #mojo
18:06 user_8014 joined #mojo
18:06 user_8014 I have 2 mojo lite apps behind an nginx reverse proxy.
18:06 user_8014 is it a problem if each apps calls the other?
18:07 bwf joined #mojo
18:13 lluad It could be fine. Your logging might get confusing, though, as the "internal" queries won't be connected to the external ones that triggered them.
18:13 Grinnz the apps could use common modules, if that's easier
18:14 user_8014 as for now they are both are using the same plugins and not calling them external
18:15 user_8014 but calling just the other app will save lots of code
18:16 user_8014 but i think it's not a good idea
18:17 lluad If it were me, I'd look at either factoring out the common code into a shared module or merging the two apps into one.
18:18 user_8014 I guess i will refactor the code and keep the modules.
18:19 stryx` joined #mojo
18:20 jberger it really depends on what you are doing
18:20 jberger in some sense apps calling each other is just a microservices pattern
18:20 jberger but you have to do that intentionally
18:38 PryMar56 joined #mojo
18:53 sri hahaha, i love this meme https://pbs.twimg.com/media/C5XLJ2rWQAAjv07.jpg
18:54 genio hahaha. that is good
19:00 genio http://gizmodo.com/everything-you-need-to-know-about-cloudbleed-the-lates-1792710616  hope nobody here uses cloudflare
19:01 sri genio: has been linked twice already today ;p
19:02 * genio lowers his head in shame
19:02 sri gotta love how their cto tells everyone it's not big deal, he's not even going to change passwords
19:02 * sri is going to avoid cloudflare because of that
19:03 genio step 1. mitm the whole internet. step 2. leak memory. step 3. piss everyone off?!
19:04 user_8014 Go for Akamai if you can afford it
19:09 vicash Akamai bungled heartbleed patch too: http://www.darkreading.com/application-security/akamai-withdraws-proposed-heartbleed-patch/d/d-id/1204443 . no one is without fault
19:13 jabberwok goes back to There Is No Cloud
19:16 user_8014 you still could run your website on localhost if you want to be safe
19:16 user_8014 but it might limit the accessiblity to others
19:19 stryx` joined #mojo
19:33 Grinnz just stay in your own internet
19:38 vicash or use Lets Encrypt for sites that don't serve more than 100 users
19:47 irqq joined #mojo
19:49 asarch joined #mojo
19:51 PopeFelix joined #mojo
20:25 PopeF joined #mojo
20:28 stryx` joined #mojo
20:39 kes joined #mojo
20:43 lluad joined #mojo
20:53 suede joined #mojo
21:07 sri re sha-1 meme https://arstechnica.com/security/2017/02/watershed-sha1-collision-just-broke-the-webkit-repository-others-may-follow/
21:09 Grinnz yay svn
21:15 jberger wow
21:15 dboehmer joined #mojo
21:22 Grinnz http://shattered.io/ the actual collision btw
21:23 Grinnz git is technically vulnerable, but not from those two files
21:44 polettix joined #mojo
21:46 user_8014 Is the letsencrypt SSL cert
21:47 user_8014 bad?
21:47 purl bad is DCC SEND "LOLDICKS" 0 0 0 or badminton
21:47 user_8014 I wanted to use it
21:47 preaction it's not bad, no. why?
21:47 user_8014 it saves around 500$ per year
21:47 user_8014 <vicash>: or use Lets Encrypt for sites that don't serve more than 100 users
21:47 user_8014 reads like, if the page is > 100 users its unreliable
21:48 preaction i'm not sure why they mentioned that. ssl certs are ssl certs. of course, letsencrypt performs no offline verification that you are who you say you are, but i've no proof that any other CA does either
21:49 user_8014 yes, i was thinking its good too
21:49 user_8014 even for sensible data
21:59 lluad letsencrypt is more reliable than you'll get from a legacy certificate authority, assuming your ops people can do basic automation.
22:00 lluad The only reason not to use it (other than "eh, we can't get the automation in place") would be that you needed EV validation rather than DV.
22:00 genio AWS has free certificates too, don't they?
22:01 lluad A few companies do.
22:01 lluad But I'd happily pay for letsencrypt certs. Their value to me is that they're not run by a gang of crooked cockwombles, which isn't something I'd say about most CAs.
22:03 lluad (I presume ATS are OK, if you're an AWS customer, but I don't know much about them)
22:06 user_8014 what the benefit of EV? green address bar?
22:07 jberger I'm assuming vicash said that because at a certainly level you probably want external caching (like CloudFlare) and they can do ssl termination for you
22:08 lluad user_8014: Yeah, green bar / green padlock.
22:09 user_8014 also there is on more difference
22:09 lluad *Theoretically* deeper validation of who you are (but that's ... kinda bullshit). Usually comes with higher insurance limits against fraud too.
22:09 user_8014 symantec for example and others offer insurance
22:09 Grinnz genio: AWS has free certs for instances where they can manage the cert, such as attaching it to one of their load balancers or so
22:09 Grinnz they won't give you the private key for the cert
22:09 Grinnz but it's pretty nice if you can make use of it
22:10 user_8014 EC2 is also VERY expensive imho
22:10 purl okay, user_8014.
22:10 Grinnz they will refresh them themselves
22:10 lluad OTOH, I've had Comodo flat out take my money and refuse to cough up the EV cert. I wouldn't trust them to *actually* pay up on insurance without a law suit.
22:11 genio nice!  let's encrypt makes things really easy though. great idea
22:16 jnbek joined #mojo
22:16 user_8014 so there is no reason to buy ssl certs anymore?
22:23 lluad Unless you're doing ecommerce and want EV, or you're a high enough profile domain that you want to pay someone else to care (e.g. MarkMonitor), and you have a web and/or dns stack stable enough to rely on, not really, no.
22:27 user_8014 i don't think someone will stop an order, if he doesn't recgonize a green address bar
22:27 user_8014 it's some hype to ask more money for the certs
22:37 jnbek joined #mojo
22:53 jberger I need to do more work on my ACME (let's encrypt) plugin
22:53 jberger especially it really should have a stand-alone (ie, not plugin) application mode
22:54 jberger I have my nginx configs for my self-hosted sites all divert acme traffic to a dummy site that is just used for issuing certs
22:54 jberger but now that means that my original paradigm of "use this plugin in your application" is kinda silly (though useful for one-offs)
22:56 nic yeah, I've just gone through the steps of taking down my real site, putting up dummy+plugin, then reinstating the real site once the certs obtained
23:05 salva joined #mojo
23:10 chansen joined #mojo
23:31 jberger nic: you don't need to do that, use the reverse proxy to catch requests to /.well-known and send them to the dummy
23:32 Grinnz i sorta have needed to do that, when the domain doesn't normally serve a site at all
23:37 jberger I should do a blog post on my nginx configs
23:37 jberger I'm really happy with them now
23:37 nic Yeah, I would have added a divert if I'd seen it in the docs
23:38 jberger docs?
23:38 purl somebody said docs was n00bs should write docs, because once the n00b is an 0ldie, the information is forgotten or http://www.infobot.org/guide-0.43.x.html
23:38 Grinnz I definitely enjoy configuring nginx more than apache, much more flexible and neat in terms of what i can do
23:39 jberger nic: as far as the documentation for Mojo::ACME it covers everything it SHOULD
23:39 Grinnz nic: https://github.com/diafygi/acme-tiny#step-3-make-your-website-host-challenge-files has an example for doing it with nginx, though that's just aliasing to a real directory rather than a mojo app
23:39 Grinnz it's basically just, dispatch based on the location directive
23:39 jberger the idea was originally for plugging in to a single application to allow it to respond to challenges
23:40 jberger Grinnz: yeah, that's a start
23:40 nic thank for the link, Grinnz
23:40 jberger hmmmm, maybe I should actually do this
23:41 nic I'd best do it this weekend, cos 3 months from now I'll again only have 5 mins to devote to this process
23:41 nic The Mojo::ACME docs are somewhat cryptic
23:41 nic I wouldn't have got it to work the first time without reading through the code
23:42 jberger some of the configuration could use a bit more explanation maybe
23:42 Grinnz docs are hard
23:42 jberger but honestly, I don't use any of the configuration
23:42 jberger docs are hard
23:42 Grinnz there's still a ton of dzil docs i want to improve, but i always forget what i felt was missing
23:42 nic You should maybe remove mention of the configuration
23:43 Grinnz because now i know how to use everything already
23:43 nic Using it, and then discovering some config combos don't work, is what cost me the most time
23:45 nic and yeah, the idea of putting it inside the app led me to needing to use config, which led to the problems
23:45 nic so a standalone app with no config and no concept of embedding it into an existing structure would help avoid that
23:48 polettix joined #mojo
23:52 jberger here is my generic setup
23:52 jberger https://gist.github.com/jberger/d04cbfa20d3a269eb1f7868e2b1f432c
23:53 jberger 01-mojo-acme defines a dummy app that just loads the Mojo::ACME plugin
23:53 jberger and runs on port 8000
23:53 jberger (usually only on when I need it)
23:53 jberger then for each application I take the "myapp" config and copy it, changing the port and maybe a setting here and there
23:54 jberger each one includes two common files
23:54 jberger those common files handle diverting the acme traffic to the dummy app
23:54 jberger and setting up the ssl configuration
23:54 jberger the rest is basically the stock mojolicious nginx config
23:55 jberger then when I use the acme command against my dummy app to issue the cert (with each of the domains) each one gets challenged and eventually the cert is issued, which I then copy to the cert and key locations and then reload nginx
23:56 jberger what I need to do is have a dummy app just come up when issuing certs if it isn't attached to an actual application
23:56 jberger that would cut out one step
23:57 jberger note also that it takes all the non-acme traffic on port 80 and redirects it to port 443
23:57 jberger which is nice too

| Channels | #mojo index | Today | | Search | Google Search | Plain-Text | summary