[Support] Linuxserver.io - Nginx


196 posts in this topic Last Reply

Recommended Posts

10 hours ago, ich777 said:

I want to run a specific cron job without changing the hosts cronjobs, is this even possible?

I think the answer is: "run a cron job inside the container in the same script" or in a standalone "cronjob" script.

 

Edit:

Found a solution at this Posting

That seem to be the best way to run a cron job. 

Link to post
  • 3 weeks later...
  • Replies 195
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

Yes

Is there a guide somewhere on how to get the reverse proxy working? I've always wanted to do this to make all the different services such as Sabnzbd and Sickrage easier to access. I've been messing wi

I solved this for my Nextcloud docker with running a script via Community Applications Auto Update module. Info from http://tower/Settings/Settings/caHelp#autoupdate:   /boot/config/

Posted Images

Hi, I am trying to use ssi, but it looks like it is not working as expected.

Is ssi support enabled for nginx in this container?

 

Update:

After waiting a few minutes and refreshing the page SSI started working.

Weird, on first use it takes about 15s for the first page load, no SSI, come back later, refresh, SSI works.

Any ideas how to get he first page load faster, and how to get SSI working on first load?

Edited by ptr727
Link to post

Hi All,

 

So i did an update to the docker around an hour ago so its on :latest with no further updates available and the startup logs now have started to show this:

[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing... 
usermod: no changes
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    911
User gid:    911
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing... 
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing... 
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 99-custom-scripts: executing... 
[custom-init] no custom scripts found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
	no field package.preload['resty.core']
	no file './resty/core.lua'
	no file '/usr/share/luajit-2.1.0-beta3/resty/core.lua'
	no file '/usr/local/share/lua/5.1/resty/core.lua'
	no file '/usr/local/share/lua/5.1/resty/core/init.lua'
	no file '/usr/share/lua/5.1/resty/core.lua'
	no file '/usr/share/lua/5.1/resty/core/init.lua'
	no file '/usr/share/lua/common/resty/core.lua'
	no file '/usr/share/lua/common/resty/core/init.lua'
	no file './resty/core.so'
	no file '/usr/local/lib/lua/5.1/resty/core.so'
	no file '/usr/lib/lua/5.1/resty/core.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './resty.so'
	no file '/usr/local/lib/lua/5.1/resty.so'
	no file '/usr/lib/lua/5.1/resty.so'
	no file '/usr/local/lib/lua/5.1/loadall.so')

 

I've never seen these before and its happening on all my dockers using this image so it doesn't seem to be a configuration fault or anything else

 

Having a quick google this doesn't seem to be a huge issue but is something worth mentioning in case it does have an affect on anything i'm unaware of

 

Regards,

Jamie

Link to post
11 hours ago, bigjme said:

Hi All,

 

So i did an update to the docker around an hour ago so its on :latest with no further updates available and the startup logs now have started to show this:


[cont-init.d] executing container initialization scripts...
[cont-init.d] 10-adduser: executing... 
usermod: no changes
-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \ 
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/
Brought to you by linuxserver.io
We gratefully accept donations at:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------
User uid:    911
User gid:    911
-------------------------------------
[cont-init.d] 10-adduser: exited 0.
[cont-init.d] 20-config: executing... 
[cont-init.d] 20-config: exited 0.
[cont-init.d] 30-keygen: executing... 
using keys found in /config/keys
[cont-init.d] 30-keygen: exited 0.
[cont-init.d] 99-custom-scripts: executing... 
[custom-init] no custom scripts found exiting...
[cont-init.d] 99-custom-scripts: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
nginx: [error] lua_load_resty_core failed to load the resty.core module from https://github.com/openresty/lua-resty-core; ensure you are using an OpenResty release from https://openresty.org/en/download.html (rc: 2, reason: module 'resty.core' not found:
	no field package.preload['resty.core']
	no file './resty/core.lua'
	no file '/usr/share/luajit-2.1.0-beta3/resty/core.lua'
	no file '/usr/local/share/lua/5.1/resty/core.lua'
	no file '/usr/local/share/lua/5.1/resty/core/init.lua'
	no file '/usr/share/lua/5.1/resty/core.lua'
	no file '/usr/share/lua/5.1/resty/core/init.lua'
	no file '/usr/share/lua/common/resty/core.lua'
	no file '/usr/share/lua/common/resty/core/init.lua'
	no file './resty/core.so'
	no file '/usr/local/lib/lua/5.1/resty/core.so'
	no file '/usr/lib/lua/5.1/resty/core.so'
	no file '/usr/local/lib/lua/5.1/loadall.so'
	no file './resty.so'
	no file '/usr/local/lib/lua/5.1/resty.so'
	no file '/usr/lib/lua/5.1/resty.so'
	no file '/usr/local/lib/lua/5.1/loadall.so')

 

I've never seen these before and its happening on all my dockers using this image so it doesn't seem to be a configuration fault or anything else

 

Having a quick google this doesn't seem to be a huge issue but is something worth mentioning in case it does have an affect on anything i'm unaware of

 

Regards,

Jamie

It's nothing to worry about, unless you use lua.

Link to post
  • 2 weeks later...
1 hour ago, aptalca said:

Looks like there are several community packages for arc, could they be used?

https://www.archlinux.org/packages/?q=brotli

And for alpine:

https://github.com/abevoelker/docker-nginx-alpine-brotli

https://github.com/fholzer/docker-nginx-brotli

 

What is your policy on compiling modules or pulling from non official sources?

Link to post
2 hours ago, ptr727 said:

Looks like there are several community packages for arc, could they be used?

https://www.archlinux.org/packages/?q=brotli

And for alpine:

https://github.com/abevoelker/docker-nginx-alpine-brotli

https://github.com/fholzer/docker-nginx-brotli

 

What is your policy on compiling modules or pulling from non official sources?

Arch packages won't work, the others are docker images

 

We don't compile nginx or the modules, because that would be a support and maintenance nightmare.

 

If new packages are needed, you can PR to alpine. That's what I do:

https://github.com/alpinelinux/aports/pull/6762

https://github.com/alpinelinux/aports/pull/7710

Link to post
33 minutes ago, aptalca said:

Arch packages won't work, the others are docker images

 

We don't compile nginx or the modules, because that would be a support and maintenance nightmare.

 

If new packages are needed, you can PR to alpine. That's what I do:

https://github.com/alpinelinux/aports/pull/6762

https://github.com/alpinelinux/aports/pull/7710

Ok, I'll see if I can get brotli support upstream, thx.

Update, I noticed there is already what appears to be brotli work in progress:

https://github.com/alpinelinux/aports/tree/4a87148212bf0b09eab3897d2dc70585f17d5cd8/community/brotli

I am not familiar with their process, is this work that is destined for release inclusion, i.e. should I just wait for it to make it to release? 

Edited by ptr727
Link to post
  • 3 months later...

Hi,

Just had a question that I've been messing around with for the past few days and can't get it to work. I've searched the forum, and while I've found related questions, nothing specific.

 

I'm running Unraid 6.5.3, and I'm trying to route docker traffic (xteve) through the the binhex-delugevpn client. I can get this to work by setting the network to "none" in the xteve docker and adding "--net=container:binhex-delugevpn" to the extra parameters. This works without issue, as when I query the IP from within the xteve console, it returns the VPN IP. My problem however is retaining access to the WebUI/ports of the xteve docker. 

 

I have found reference elsewhere (https://github.com/dperson/openvpn-client/blob/master/README.md) to using this methodology, but then setting up a nginx proxy to retain access ports. For the life of me, however, I can't figure out how to get this to work. I have installed the nginx docker, but it won't start as there are port conflicts. Even if I could get it to start, I'm still fairly unclear as to what I actually need to do. I'm at kind of a loss, and any help would be greatly appreciated.

 

Thanks!

Link to post
  • 2 months later...

I searched but could not find anything but im not 100% sure its the dockers issue or not.  I have a simple php page that will list out files and directories onto a page with links.  I set the port on the docker to be 8082 and i have my sophos firewall forwarding all port 80 traffic to the unraid server ip port 8082.  The issue is the links on my page look like they would be going to website/directory but it is for some reason trying to goto website:8082/directory.  If i let it break and clear out the port it works.  Any ideas why i would be seeing this?  Sorry this is my first time dealing with nginx in a docker usually we just install this direct on a server for something like this.

Link to post
20 hours ago, Scott Harkless said:

I searched but could not find anything but im not 100% sure its the dockers issue or not.  I have a simple php page that will list out files and directories onto a page with links.  I set the port on the docker to be 8082 and i have my sophos firewall forwarding all port 80 traffic to the unraid server ip port 8082.  The issue is the links on my page look like they would be going to website/directory but it is for some reason trying to goto website:8082/directory.  If i let it break and clear out the port it works.  Any ideas why i would be seeing this?  Sorry this is my first time dealing with nginx in a docker usually we just install this direct on a server for something like this.

Perhaps nat reflection? Does it happen when you connect from wan? Like on a cell phone with wifi turned off?

Link to post
On 11/27/2019 at 12:35 PM, aptalca said:

Perhaps nat reflection? Does it happen when you connect from wan? Like on a cell phone with wifi turned off?

All my tests were from the WAN.  If I goto the IP:8082 like I have setup in the configuration from the LAN it works just fine.  Maybe I just need to have people come in via port 8082 and not try to redirect port 80 outside to port 8082 inside.

Link to post
1 hour ago, Scott Harkless said:

All my tests were from the WAN.  If I goto the IP:8082 like I have setup in the configuration from the LAN it works just fine.  Maybe I just need to have people come in via port 8082 and not try to redirect port 80 outside to port 8082 inside.

If you can connect with your IP:8082 you have an open port that should be closed. You only need port 80 or 443 to the outside.

Link to post
  • 2 weeks later...

Hey, im trying to run dompdf in the container. It requires the module imagick. From a call to phpinfo() i can see that it is listed as module but with 0 supported formats. I also tried to add a "90-config" with

#!/usr/bin/with-contenv bash
apk add --no-cache php7-pecl-imagick

in it but the container just exits with code 127.

How can i solve this issue?

Also i can't open the

nginx\log\php\error.log

via the windows explorer - is that intended?
The output from 

cat /mnt/cache/appdata/nginx/log/php/error.log

[14-Dec-2019 18:03:06] NOTICE: fpm is running, pid 288
[14-Dec-2019 18:03:06] NOTICE: ready to handle connections
[14-Dec-2019 18:03:42] NOTICE: Terminating ...
[14-Dec-2019 18:03:42] NOTICE: exiting, bye-bye!
[14-Dec-2019 18:03:53] NOTICE: fpm is running, pid 284
[14-Dec-2019 18:03:53] NOTICE: ready to handle connections
[14-Dec-2019 18:56:09] NOTICE: Terminating ...
[14-Dec-2019 18:56:09] NOTICE: exiting, bye-bye!
[14-Dec-2019 18:57:15] NOTICE: fpm is running, pid 287
[14-Dec-2019 18:57:15] NOTICE: ready to handle connections
[14-Dec-2019 19:29:50] NOTICE: Terminating ...
[14-Dec-2019 19:29:50] NOTICE: exiting, bye-bye!
[14-Dec-2019 19:37:52] NOTICE: fpm is running, pid 284
[14-Dec-2019 19:37:52] NOTICE: ready to handle connections
[14-Dec-2019 19:44:21] NOTICE: Terminating ...
[14-Dec-2019 19:44:21] NOTICE: exiting, bye-bye!


 

9xLNYoa.png

ni7yr7j.png

Anmerkung 2019-12-14 204739.png

Anmerkung 2019-12-14 204911.png

Anmerkung 2019-12-14 205359A.png

Edited by slize
Link to post
3 hours ago, slize said:

Hey, im trying to run dompdf in the container. It requires the module imagick. From a call to phpinfo() i can see that it is listed as module but with 0 supported formats. I also tried to add a "90-config" with


#!/usr/bin/with-contenv bash
apk add --no-cache php7-pecl-imagick

in it but the container just exits with code 127.

How can i solve this issue?

Also i can't open the


nginx\log\php\error.log

via the windows explorer - is that intended?
The output from 


cat /mnt/cache/appdata/nginx/log/php/error.log

[14-Dec-2019 18:03:06] NOTICE: fpm is running, pid 288
[14-Dec-2019 18:03:06] NOTICE: ready to handle connections
[14-Dec-2019 18:03:42] NOTICE: Terminating ...
[14-Dec-2019 18:03:42] NOTICE: exiting, bye-bye!
[14-Dec-2019 18:03:53] NOTICE: fpm is running, pid 284
[14-Dec-2019 18:03:53] NOTICE: ready to handle connections
[14-Dec-2019 18:56:09] NOTICE: Terminating ...
[14-Dec-2019 18:56:09] NOTICE: exiting, bye-bye!
[14-Dec-2019 18:57:15] NOTICE: fpm is running, pid 287
[14-Dec-2019 18:57:15] NOTICE: ready to handle connections
[14-Dec-2019 19:29:50] NOTICE: Terminating ...
[14-Dec-2019 19:29:50] NOTICE: exiting, bye-bye!
[14-Dec-2019 19:37:52] NOTICE: fpm is running, pid 284
[14-Dec-2019 19:37:52] NOTICE: ready to handle connections
[14-Dec-2019 19:44:21] NOTICE: Terminating ...
[14-Dec-2019 19:44:21] NOTICE: exiting, bye-bye!


 

9xLNYoa.png

ni7yr7j.png

Anmerkung 2019-12-14 204739.png

Anmerkung 2019-12-14 204911.png

Anmerkung 2019-12-14 205359A.png

Most likely line endings in the script. Make sure it's Unix format

Link to post
On 12/15/2019 at 12:00 AM, aptalca said:

Most likely line endings in the script. Make sure it's Unix format

Thank you for the fast reply! You are right, i recreated the file with nano via SSH and the container is now starting. But im still getting 0 supported formats. This is the new console output:

aaaaa45.png

 

 

 

Edit:

@ich777 is this still working for you/do you know whats wrong with my container?

Edited by slize
Link to post

@slize Yes it works for me it looks like this on my server:

 

grafik.png.b94a62704a1d528a78f7373f2ec3c32f.png

 

Also here i attached my config file:

grafik.png.1189dd44d414589ca9f9739bacbdf57b.png

 

 

I run nextcloud directly in the LetsEncrypt container from @linuxserver.io that's why i need the additional php modules, also i got many reverse proxy's and i also mount homeassistant, gitea and other logs into the container to use fail2ban... (one container to rule them all) :D

Edited by ich777
Link to post
On 12/16/2019 at 9:48 PM, ich777 said:

@slize Yes it works for me it looks like this on my server:

 

grafik.png.b94a62704a1d528a78f7373f2ec3c32f.png

 

Also here i attached my config file:

grafik.png.1189dd44d414589ca9f9739bacbdf57b.png

 

 

I run nextcloud directly in the LetsEncrypt container from @linuxserver.io that's why i need the additional php modules, also i got many reverse proxy's and i also mount homeassistant, gitea and other logs into the container to use fail2ban... (one container to rule them all) :D


Well very strange. Does your phpinfo also list "ImageMagick number of supported formats" with 0?

Maybe @linuxserver.io can you help me?

 

With this 90-config:

apk add --no-cache htop
apk add --no-cache php7-pecl-imagick
apk add --no-cache libmagic

I get an output like:

[cont-init.d] 90-config: executing...
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
(1/1) Installing htop (2.2.0-r0)
Executing busybox-1.31.1-r8.trigger
OK: 170 MiB in 163 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
OK: 170 MiB in 163 packages
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
OK: 170 MiB in 163 packages
[cont-init.d] 90-config: exited 0.

So my config seems to work - but im still stuck with 

ImageMagick number of supported formats:	0

 

Final edit:

I manged to fix it.

90-config:

apk add --no-cache php7-pecl-imagick
apk add --no-cache imagemagick
ImageMagick number of supported formats:	233

 

 

Edited by slize
Added more info
Link to post
  • 3 months later...

be great if goaccess could be integrated into this.

I use custom BR network and sep IP addresses for these containers so they can be managed by my firewall and I cant get the goaccess container to read the logs from the seperate nginx container.  Anyone know how ? 

 

edit - ignore - I figured it out, I had configured my own custom access.log files in nginx, so the default access.log was empty.  Have edited the goaccess.conf to point to emby.log instead of access.log and I have data now.

Edited by vw-kombi
Link to post
  • 1 month later...
  • 1 month later...
  • 3 weeks later...

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.