Swag update broke reverse proxy and publishing of nextcloud. :(


Go to solution Solved by Alemiser,

Recommended Posts

Last swag docker update caused a issue with my ability to published my instance of nextcloud out to my duckdns subdomain. 

 

On swag boot I get the initial repot in the log:

 

**** The following active confs have different version dates than the samples that are shipped. ****
**** This may be due to user customization or an update to the samples. ****
**** You should compare the following files to the samples in the same folder and update them. ****
**** Use the link at the top of the file to view the changelog. ****
┌────────────┬────────────┬────────────────────────────────────────────────────────────────────────┐
│  old date  │  new date  │ path                                                                   │
├────────────┼────────────┼────────────────────────────────────────────────────────────────────────┤
│ 2020-10-04 │ 2022-08-16 │ /config/nginx/nginx.conf                                               │
│ 2020-06-02 │ 2022-08-20 │ /config/nginx/ldap-server.conf                                         │
│ 2020-05-31 │ 2022-09-22 │ /config/nginx/authelia-server.conf                                     │
│ 2020-05-31 │ 2022-08-20 │ /config/nginx/authelia-location.conf                                   │
│ 2020-10-29 │ 2022-08-20 │ /config/nginx/ssl.conf                                                 │
│ 2020-10-04 │ 2022-09-01 │ /config/nginx/proxy.conf                                               │
│ 2020-12-09 │ 2022-10-28 │ /config/nginx/proxy-confs/nextcloud.subdomain.conf                     │
│ 2021-01-03 │ 2022-10-03 │ /config/nginx/site-confs/default.conf                                  │
└────────────┴────────────┴────────────────────────────────────────────────────────────────────────┘
[custom-init] No custom files found, skipping...
[ls.io-init] done.
Server ready

 

Then I get a spamming message in the log :

 

nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3
nginx: [emerg] "stream" directive is not allowed here in /etc/nginx/conf.d/stream.conf:3

 

local port still works but the subdomain just times out.

Can anyone help me?

Thanks.

 

Version 6.11.5

Link to comment
  • Solution

This is what i did to fix it.

Stop Swag docker

Go to \\<server>\appdata\swag\nginx folder

rename original nginx.conf to nginx.conf.old

copy nginx.conf.sample to nginx.conf

rename ssl.conf to ssl.conf.old

copy ssl.conf.sample to ssl.conf

restart swag docker

 

This worked for me

  • Like 1
  • Thanks 14
  • Upvote 1
Link to comment
4 hours ago, Alemiser said:

This is what i did to fix it.

Stop Swag docker

Go to \\<server>\appdata\swag\nginx folder

rename original nginx.conf to nginx.conf.old

copy nginx.conf.sample to nginx.conf

rename ssl.conf to ssl.conf.old

copy ssl.conf.sample to ssl.conf

restart swag docker

 

This worked for me

This worked for me!
Thank you!

Link to comment
9 hours ago, Alemiser said:

This is what i did to fix it.

Stop Swag docker

Go to \\<server>\appdata\swag\nginx folder

rename original nginx.conf to nginx.conf.old

copy nginx.conf.sample to nginx.conf

rename ssl.conf to ssl.conf.old

copy ssl.conf.sample to ssl.conf

restart swag docker

 

This worked for me

 

I had the same issue. This worked for me. Thank you!

Link to comment

You can also just comment out the next line:

include /etc/nginx/conf.d/*.conf;

like so:

# include /etc/nginx/conf.d/*.conf;

inside your nginx.conf file. (or just delete the line completely)

 

The only file inside /etc/nginx/conf.d/ folder is the stream.conf file.

 

I think this is better because there are some custom values added in the nginx.conf that are gone in the nginx.conf.sample file.

 

 

An alternative is going into the console of the Swag Container and do the following:

ls -al /etc/nginx/conf.d/ /etc/nginx/stream.d/
mv -v /etc/nginx/conf.d/stream.conf /etc/nginx/stream.d/

Source: 

 

Edited by Smoetzak
  • Like 1
  • Thanks 2
Link to comment
On 1/26/2023 at 5:18 AM, Alemiser said:

This is what i did to fix it.

Stop Swag docker

Go to \\<server>\appdata\swag\nginx folder

rename original nginx.conf to nginx.conf.old

copy nginx.conf.sample to nginx.conf

rename ssl.conf to ssl.conf.old

copy ssl.conf.sample to ssl.conf

restart swag docker

 

This worked for me

I only did the ngnx.conf and it worked, did not touch ssl.conf, and it worked.
Thanks!

Edited by Mihle
Link to comment
  • 4 weeks later...

It didn't work for me though... :( 

I'm wondering if it's something from my server, cause I stopped the swag container and started one NPM container I had working a few weeks ago for testing and it's the same. I mean, the log console it's ok, but I get a 552 error when I'm trying to connect to any of my services.

Link to comment
  • 3 weeks later...
On 1/26/2023 at 6:18 AM, Alemiser said:

This is what i did to fix it.

Stop Swag docker

Go to \\<server>\appdata\swag\nginx folder

rename original nginx.conf to nginx.conf.old

copy nginx.conf.sample to nginx.conf

rename ssl.conf to ssl.conf.old

copy ssl.conf.sample to ssl.conf

restart swag docker

 

This worked for me

 

Amazing man, I suspected something had changed in the updated and my config was old. 
This saved me a ton of debugging!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.