I running a nextcloud:fpm container in docker
docker run -d -v /nextcloud:/var/www/html nextcloud:fpm
the port 9000 was not opened after container initialization finished.
If I map container port 9000 to host
docker run -d -v /nextcloud:/var/www/html -p 9000:9000 nextcloud:fpm
and proxy port 80 to port 9000, nextcloudâs web page can be opened, but without style
browser error message
Refused to execute script from ââ because its MIME type (âtext/htmlâ) is not executable, and strict MIME type checking is enabled.
localhost/:1 Refused to execute script from âhttp://localhost/core/js/dist/main.js?v=ba222ded25d957b900c03bef914333cdâ because its MIME type (âtext/htmlâ) is not executable, and strict MIME type checking is enabled.
âŚ
How to config nginx(host) for fpm container?
sure that you want to run nginx on the host and not in a container?
youâll find a lot of examples here:
or without letsencrypt certificate:
Thank you!
My host is a VM with a small amount of memory, and I deployed a web server nginx on my host before installing nextcloud, so I wanted to use the hostâs nginx directly instead of adding an nginx container.
Also, using the nextcloud:apache container might be a better choice than adding nginx containers.
ok. the nginx conf should be basically the same. i guess. you only have to change the server name app
the upstream php-handler section to localhost
.
and to my understanding an nginx container is more or less the same like a nginx process on the host.
Thank you for your help.
Iâve tried this, and as I said on #1, the nextcloud web page that opens will have no style.
the php-fpm canât handle static web content. (e.g. css files)
so you must not proxy port 9000.
you must setup a web server that handles everything (html, css, âŚ) except php. all request for php are redirected to the php-fpm container. thatâs defined in the upstream section.