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.
âŚ
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.
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.