linuxserver.io Posted December 5, 2015 Share Posted December 5, 2015 (edited) Application Name: Nginx Application Site: https://www.nginx.com/ Docker Hub: https://hub.docker.com/r/linuxserver/nginx/ Github: https://github.com/linuxserver/docker-nginx Please post any questions/issues relating to this docker you have in this thread. If you are not using Unraid (and you should be!) then please do not post here, instead head to linuxserver.io to see how to get support. Edited September 14, 2018 by linuxserver.io Quote Link to comment
stealth82 Posted December 6, 2015 Share Posted December 6, 2015 Something is not right. I downloaded the docker and although nginx is advertised apache2 was deployed... LOL The nginx.xml files looks like this: <?xml version="1.0" encoding="utf-8"?> <Container> <Beta>False</Beta> <Category>Network:Web Network:Proxy</Category> <Date>2015-12-05</Date> <Name>Nginx</Name> <Support>http://lime-technology.com/forum/index.php?topic=44481.0</Support> <Overview>is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache.</Overview> <Changes> [center][img width='300px' src='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_small.png'][/center] [center][font size=4]Nginx Change Log[/font][/center] [b]06.12.2015:[/b] Initial Release</Changes> <Description>is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache..[br] [b][u][span style='color: #E80000;']Configuration[/span][/u][/b][br] [b]80[/b] Standard HTTP Port [br] [b]443[/b] Standard HTTPS Port [br] [b]/config[/b]Storing Configuration and the www folder[br] </Description> <Project>https://www.nginx.com/</Project> <Registry>https://registry.hub.docker.com/u/linuxserver/nginx/</Registry> <Repository>linuxserver/apache</Repository> <BindTime>true</BindTime> <Privileged>false</Privileged> <Environment> <Variable> <Name>PUID</Name> <Value>99</Value> </Variable> <Variable> <Name>PGID</Name> <Value>100</Value> </Variable> </Environment> <Networking> <Mode>bridge</Mode> <Publish> <Port> <HostPort>80</HostPort> <ContainerPort>80</ContainerPort> <Protocol>tcp</Protocol> </Port> <Port> <HostPort>443</HostPort> <ContainerPort>443</ContainerPort> <Protocol>tcp</Protocol> </Port> </Publish> </Networking> <Data> <Volume> <HostDir>/mnt/user/appdata/nginx</HostDir> <ContainerDir>/config</ContainerDir> <Mode>rw</Mode> </Volume> </Data> <Version></Version> <WebUI>http://[iP]:[PORT:80]/</WebUI> <Banner>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png</Banner> <Icon>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-icon.png</Icon> <ExtraParams></ExtraParams> </Container> I think the wrong repository is listed Quote Link to comment
sparklyballs Posted December 6, 2015 Share Posted December 6, 2015 Something is not right. I downloaded the docker and although nginx is advertised apache2 was deployed... LOL The nginx.xml files looks like this: <?xml version="1.0" encoding="utf-8"?> <Container> <Beta>False</Beta> <Category>Network:Web Network:Proxy</Category> <Date>2015-12-05</Date> <Name>Nginx</Name> <Support>http://lime-technology.com/forum/index.php?topic=44481.0</Support> <Overview>is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache.</Overview> <Changes> [center][img width='300px' src='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_small.png'][/center] [center][font size=4]Nginx Change Log[/font][/center] [b]06.12.2015:[/b] Initial Release</Changes> <Description>is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache..[br] [b][u][span style='color: #E80000;']Configuration[/span][/u][/b][br] [b]80[/b] Standard HTTP Port [br] [b]443[/b] Standard HTTPS Port [br] [b]/config[/b]Storing Configuration and the www folder[br] </Description> <Project>https://www.nginx.com/</Project> <Registry>https://registry.hub.docker.com/u/linuxserver/nginx/</Registry> <Repository>linuxserver/apache</Repository> <BindTime>true</BindTime> <Privileged>false</Privileged> <Environment> <Variable> <Name>PUID</Name> <Value>99</Value> </Variable> <Variable> <Name>PGID</Name> <Value>100</Value> </Variable> </Environment> <Networking> <Mode>bridge</Mode> <Publish> <Port> <HostPort>80</HostPort> <ContainerPort>80</ContainerPort> <Protocol>tcp</Protocol> </Port> <Port> <HostPort>443</HostPort> <ContainerPort>443</ContainerPort> <Protocol>tcp</Protocol> </Port> </Publish> </Networking> <Data> <Volume> <HostDir>/mnt/user/appdata/nginx</HostDir> <ContainerDir>/config</ContainerDir> <Mode>rw</Mode> </Volume> </Data> <Version></Version> <WebUI>http://[iP]:[PORT:80]/</WebUI> <Banner>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png</Banner> <Icon>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-icon.png</Icon> <ExtraParams></ExtraParams> </Container> I think the wrong repository is listed fixt, thanks for letting us know. Quote Link to comment
CHBMB Posted December 6, 2015 Share Posted December 6, 2015 Something is not right. I downloaded the docker and although nginx is advertised apache2 was deployed... LOL The nginx.xml files looks like this: <?xml version="1.0" encoding="utf-8"?> <Container> <Beta>False</Beta> <Category>Network:Web Network:Proxy</Category> <Date>2015-12-05</Date> <Name>Nginx</Name> <Support>http://lime-technology.com/forum/index.php?topic=44481.0</Support> <Overview>is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache.</Overview> <Changes> [center][img width='300px' src='https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/linuxserver_small.png'][/center] [center][font size=4]Nginx Change Log[/font][/center] [b]06.12.2015:[/b] Initial Release</Changes> <Description>is a web server with a strong focus on high concurrency, performance and low memory usage. It can also act as a reverse proxy server for HTTP, HTTPS, SMTP, POP3, and IMAP protocols, as well as a load balancer and an HTTP cache..[br] [b][u][span style='color: #E80000;']Configuration[/span][/u][/b][br] [b]80[/b] Standard HTTP Port [br] [b]443[/b] Standard HTTPS Port [br] [b]/config[/b]Storing Configuration and the www folder[br] </Description> <Project>https://www.nginx.com/</Project> <Registry>https://registry.hub.docker.com/u/linuxserver/nginx/</Registry> <Repository>linuxserver/apache</Repository> <BindTime>true</BindTime> <Privileged>false</Privileged> <Environment> <Variable> <Name>PUID</Name> <Value>99</Value> </Variable> <Variable> <Name>PGID</Name> <Value>100</Value> </Variable> </Environment> <Networking> <Mode>bridge</Mode> <Publish> <Port> <HostPort>80</HostPort> <ContainerPort>80</ContainerPort> <Protocol>tcp</Protocol> </Port> <Port> <HostPort>443</HostPort> <ContainerPort>443</ContainerPort> <Protocol>tcp</Protocol> </Port> </Publish> </Networking> <Data> <Volume> <HostDir>/mnt/user/appdata/nginx</HostDir> <ContainerDir>/config</ContainerDir> <Mode>rw</Mode> </Volume> </Data> <Version></Version> <WebUI>http://[iP]:[PORT:80]/</WebUI> <Banner>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-banner.png</Banner> <Icon>https://raw.githubusercontent.com/linuxserver/docker-templates/master/linuxserver.io/img/nginx-icon.png</Icon> <ExtraParams></ExtraParams> </Container> I think the wrong repository is listed I'd like to add that we will humiliate the member responsibly on your behalf... Quote Link to comment
paramehdic Posted December 9, 2015 Share Posted December 9, 2015 Not sure if proper place to post but as a home user what benefit will I receive from using this? Will it "cache" information to pages/frequent downloads faster? Thought I had read about people using nginx to cache steam / windows update etc not sure if I am mixing it up with something else tho... Thanks and sorry if in wrong location. Quote Link to comment
bb12489 Posted December 11, 2015 Share Posted December 11, 2015 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 with it for about 2 hours now and I'm completely lost... 1 Quote Link to comment
smdion Posted December 11, 2015 Share Posted December 11, 2015 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 with it for about 2 hours now and I'm completely lost... Hey bb12489, I wrote a guide a while back for Apache (https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/). I just converted over to nginx and do not have a write up yet (i plan too, just been busy) Here is my old apache config - https://www.seandion.com/owncloud/index.php/s/R4tJqfqb4opuOsp Here is my new nginx config - https://www.seandion.com/owncloud/index.php/s/XpFigScMblZO2dJ Those should help a bit more and I will be doing an nginx addition to that guide. Quote Link to comment
bb12489 Posted December 11, 2015 Share Posted December 11, 2015 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 with it for about 2 hours now and I'm completely lost... Hey bb12489, I wrote a guide a while back for Apache (https://www.linuxserver.io/index.php/overview-reverse-proxy-with-docker/). I just converted over to nginx and do not have a write up yet (i plan too, just been busy) Here is my old apache config - https://www.seandion.com/owncloud/index.php/s/R4tJqfqb4opuOsp Here is my new nginx config - https://www.seandion.com/owncloud/index.php/s/XpFigScMblZO2dJ Those should help a bit more and I will be doing an nginx addition to that guide. Thank you! This will be a weekend project for sure. Quote Link to comment
bigjme Posted December 30, 2015 Share Posted December 30, 2015 So I have been having a play with this docker for a websites I host and it is working amazing pairs with your mysql docker. One question I have is; is there a way to upgrade the php version if needed? It is currently running a version that is around a year old now. I'm aware it is most likely something that would need to be changed in the docker itself but it's worth an ask Regards, Jamie Quote Link to comment
keepitshut Posted January 17, 2016 Share Posted January 17, 2016 Hi can I just check is there any reason why my nginx server has issues with serving up css files? I am trying to serve static sites generated by Hugo. I have an apache server that is behind nginx, and nginx is used as a reverse proxy. When I visit apache directly, the site displays correctly. But when I attempt to access it through nginx however, the site comes out completely unstyled. I tested the .css links inside the page's source and there are no issues, as in I am able to see the css directly. Its just for some reason the css does not render out. For the avoidance of doubt, I mainly use this nginx server just as a reverse proxy and for ssl encryption. This is the config i have for nginx: server { server_name xxx.me www.xxx.me; listen 443 ssl; root /config/www; index index.html index.htm index.php; ### Set Certificates ### ssl_certificate /certs/live/junxuan.me/fullchain.pem; ssl_certificate_key /certs/live/junxuan.me/privkey.pem; ### Add Diffie–Hellman key exchange ### ssl_dhparam /etc/ssl/certs/dhparam.pem; ### Disable SSL by enforcing TLS ### ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ### Add some ciphers and reject weaker ones ### ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ### Add HTTP Strict Transport Security ### add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; add_header Front-End-Https on; ###Other Settings ### client_max_body_size 0m; location / { ### Proxy Pass Info ### proxy_pass http://192.168.0.101:8082/; <-- this is my apache server } } server { listen 80; server_name www.xxx.me; return 301 https://$server_name$request_uri; } Quote Link to comment
smashingtool Posted January 20, 2016 Share Posted January 20, 2016 I am having the same issue as Keepitshut. Nginx is working, but css files are not. Quote Link to comment
keepitshut Posted January 20, 2016 Share Posted January 20, 2016 I am having the same issue as Keepitshut. Nginx is working, but css files are not. hey man, i figured out the problem for mine. Mine was because my assets were being loaded over normal http and thus was being blocked by the browser. Not sure if it is the same for you, but should be worth checking out. Quote Link to comment
knalbone Posted January 28, 2016 Share Posted January 28, 2016 How would I use this container on port 80 if Unraid's WebGUI is already bound to port 80? Can I change the emhttp port somewhere in the unraid config? Quote Link to comment
bigjme Posted January 28, 2016 Share Posted January 28, 2016 I set it to port 81, then my router translates external port 80 to internal 81 Quote Link to comment
knalbone Posted January 28, 2016 Share Posted January 28, 2016 I actually only open port 443 on my router. I just want port 80 accessible internally. Quote Link to comment
bigjme Posted January 28, 2016 Share Posted January 28, 2016 Is it on a single computer you need to access it from? You can open it on another port and use it. Its the easiest option, alternatively you can edit your host file on a Windows pc Quote Link to comment
knalbone Posted January 28, 2016 Share Posted January 28, 2016 Nope, I would like it accessible from multiple hosts. I'm actually already running nginx on another VM, but would like to eliminate it if possible. So the question is, is it possible to change the port that the UNRAID webGUI is running on? I could easily reverse proxy it after the fact. Quote Link to comment
CHBMB Posted January 28, 2016 Share Posted January 28, 2016 Nope, I would like it accessible from multiple hosts. I'm actually already running nginx on another VM, but would like to eliminate it if possible. So the question is, is it possible to change the port that the UNRAID webGUI is running on? I could easily reverse proxy it after the fact. It is possible to change the default port for Unraid. However, the other way of doing it is what I do, I run my webserver on port 81 and forward port 80 on my router to port 81 on Unraid. So any requests to my domain name still work and I get to leave Unraid where it is... To change the Unraid port though, look here. Quote Link to comment
knalbone Posted January 28, 2016 Share Posted January 28, 2016 Thank you! I actually want port 80 available internally so the thread you linked is very helpful. Quote Link to comment
nallar Posted February 1, 2016 Share Posted February 1, 2016 How can I update the version of nginx to one which supports HTTP2? The version in the docker is 1.4.6. HTTP2 has been supported since 1.9.5. I see that the docker automatically updates when starting, but from ubuntu trusty repos which have an old version of nginx. A newer version is available in: deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx Quote Link to comment
nallar Posted February 5, 2016 Share Posted February 5, 2016 Steps to upgrade to nginx mainline (currently 1.9.10): docker exec -it Nginx bash add-apt-repository ppa:nginx/development apt-get update apt-get -y dist-upgrade To check your config is correct before restarting, you can run: nginx -tc /config/nginx/nginx.conf Quote Link to comment
CHBMB Posted February 5, 2016 Share Posted February 5, 2016 That may not survive a reboot or container restart. Quote Link to comment
nallar Posted February 5, 2016 Share Posted February 5, 2016 That may not survive a reboot or container restart. It survives rebooting, doesn't survive editing the container or updating the container. Any chance of getting the container to include repositories with a more recent version of nginx by default? The current version (1.4+backported security fixes) is nearly two years old. Quote Link to comment
bigjme Posted February 5, 2016 Share Posted February 5, 2016 I'm up for a new version if Sparklyballs is up for it? Quote Link to comment
Recommended Posts
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.