Re: rewriting $arg into request.

2020-01-31 Thread Steve Wilson
On 31/01/2020 12:37, Reinis Rozitis wrote: if ($arg_p) { return 301http://yoursite/p/$arg_p; } This is what I was originally looking for, however as I've only 20 pages to manage the individual redirects via the map directive I believe will work better as it will remove a additional r

right config for letsencrypt

2020-01-31 Thread bagagerek
Hi y'all, I want Nginx to run as a reverse proxy on my Rasberry pi with Motioneye. I followed the manual but I can't seem tot get it right. I've forwarded port 8081 on my router. My "sites-enabled" file looks like this: server {     listen 80;     server_name mydomain.com;     location /cams/

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 10:49:26AM -0500, MarcoI wrote: Hi there, > This is the output of the "Network" tab : > https://drive.google.com/open?id=1QJMe8FEBrEuWacHWeJ_TQegMkF0v68AY That picture looks like the right-hand side is showing the "request details" of the fifth request down, the red "info

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread MarcoI
This is the output of the "Network" tab : https://drive.google.com/open?id=1QJMe8FEBrEuWacHWeJ_TQegMkF0v68AY " Either a http redirect response header, or some response body content, invites the browser to try to access localhost" : as far as I see and understand, the requested URL, or the URL to wh

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 09:05:08AM -0500, MarcoI wrote: Hi there, Thanks for that info. Sadly, it looks like the "curl" output is not immediately-obviously useful for determining why your browser tries to access "localhost" when you tell it to access ggc.world. If you repeat the initial test in

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread MarcoI
Sorry I have to complete the last answer: >From the laptop: (base) marco@marco-U36SG:~$ curl -vk https://ggc.world/sockjs-node/info?t=1580397983088 * Trying 2.36.58.214:443... * TCP_NODELAY set * Connected to ggc.world (2.36.58.214) port 443 (#0) * ALPN, offering http/1.1 * successfully set cer

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread MarcoI
>From within the PC-Server: (base) marco@pc:~/vueMatters/testproject$ curl -vk https://localhost/sockjs-node/info?t=1580397983088 * Trying ::1... * TCP_NODELAY set * connect to ::1 port 443 failed: Connection refused * Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1)

Re: rewriting $arg into request.

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 12:11:54PM +, Steve Wilson wrote: Hi there, > Hugo's alias basically creates a /alias/index.html file which contains a > meta refresh. Ah, ok. Presumably there would have to be some web server config needed to make the incoming request actually serve that file -- I th

RE: rewriting $arg into request.

2020-01-31 Thread Reinis Rozitis
> > if ($args ~ "^p=(\d+)") { > set $page $1; > set $args ""; > rewrite ^.*$ /p/$page last; > break; > } > > I knew there'd be a simpler way and I due to the time

Re: rewriting $arg into request.

2020-01-31 Thread Steve Wilson
Hugo's alias basically creates a /alias/index.html file which contains a meta refresh. I managed to find something using an if which does the job, however using the map solution presented is much more elegant as it would reduce the redirects.     if ($args ~ "^p=(\d+)") {  

Re: rewriting $arg into request.

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 01:13:30AM +, Steve Wilson wrote: Hi there, > Currently wordpress is using ugly urls for posts, so "/?p=1234" in wordpress > might be "/this_nice_title" in hugo. > Now hugo allows me to specify aliases too which I'd like to leverage to > maintain links, but this is whe

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread Francis Daly
On Fri, Jan 31, 2020 at 04:40:45AM -0500, MarcoI wrote: Hi there, > I add more information and a question: > (base) marco@marco-U36SG:~$ curl -Iki > https://ggc.world/sockjs-node/info?t=1580397983088 > HTTP/1.1 405 Method Not Allowed > Server: nginx/1.14.0 (Ubuntu) > Date: Fri, 3

Re: net::ERR_CONNECTION_REFUSED . How to correctly configure Nginx with Socket.io?

2020-01-31 Thread MarcoI
I add more information and a question: >From within the PC-Server: (base) marco@pc:~$ curl -Iki https://localhost/sockjs-node/info?t=1580397983088 HTTP/2 405 server: nginx/1.14.0 (Ubuntu) date: Fri, 31 Jan 2020 08:19:02 GMT allow: OPTIONS, GET >From the laptop: (base) m