SolvedMailu Nginx Reverse Proxy error

SOLUTION: linuxserver/reverse-proxy-confs#154

TO-DO:

  • Reverse-proxy
  • Fix login fail to webmail, seems to be a 301 nginx error

Im using this image: https://hub.docker.com/r/linuxserver/letsencrypt/

And im trying to create a mailu.subfolder.conf or even better a mailu.subdomain.conf, but first i am trying to do it with a subfolder, because of the wiki https://mailu.io/1.7/reverse.html

Now my problem, i have 0 idea of how to create a reverse proxy and the wiki its confusing for me, because i have tried almost every issue open or close here talking about reverse proxy and i have nothing only this page showing:

imagen

I would like to get help and create a mailu.subfolder.conf and add it to https://github.com/linuxserver/reverse-proxy-confs to avoid getting the same errors.

i have tried too to edit a pre-configured reverse-proxy i took as example adminer:

# adminer does not require a base url setting, but the container needs to be named adminer

location /adminer {
    return 301 $scheme://$host/adminer/;
}
location ^~ /adminer/ {
    # enable the next two lines for http auth
    #auth_basic "Restricted";
    #auth_basic_user_file /config/nginx/.htpasswd;

    # enable the next two lines for ldap auth, also customize and enable ldap.conf in the default conf
    #auth_request /auth;
    #error_page 401 =200 /login;

    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;
    set $upstream_app adminer;
    set $upstream_port 8080;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port;

And did this (i have tried first to get working atleast /admin and them make works /webmail, but i couldnt 😢 ):

# adminer does not require a base url setting, but the container needs to be named adminer

location /admin{
    return 301 $scheme://$host/admin/;
}
location ^~ /admin/ {
    include /config/nginx/proxy.conf;
    resolver 127.0.0.11 valid=30s;
    set $upstream_app front;
    set $upstream_port 8080;
    set $upstream_proto http;
    proxy_pass $upstream_proto://$upstream_app:$upstream_port/admin;

}

Got same error

imagen

And i dont know what to test more, because i have trying this 4 days, if someone could help me would be amazing, because i dont want to rent another VPS to only host Mailu.

I creating the files at:

Proxy-confs folder:
/nginx/proxy-confs

imagen

Nginx Folder:
/nginx/

imagen

47 Answers

✔️Accepted Answer

here my structure and the front docker-compose
image
# Core services front: image: ${DOCKER_ORG:-mailu}/${DOCKER_PREFIX:-}nginx:${MAILU_VERSION:-1.7} restart: always env_file: mailu.env logging: driver: json-file ports: # - 8080:80 # - 8443:443 - "10.28.201.155:25:25" - "10.28.201.155:465:465" - "10.28.201.155:587:587" - "10.28.201.155:110:110" - "10.28.201.155:995:995" - "10.28.201.155:143:143" - "10.28.201.155:993:993" volumes: - "/data/mailu/letsencrypt/etc/letsencrypt/archive/domain.tld:/certs" - "/data/mailu/overrides/nginx:/overrides"

Related Issues:

17
Mailu Allow specific users to send email from any address
Hi There The Mailu-Project is currently in a bit of a bind! We are short on man-power ...
15
Mailu ClamAV using all my disk space
Hi There The Mailu-Project is currently in a bit of a bind! We are short on man-power ...
8
Mailu Access logfile for Fail2ban
For my environment I put the log to syslog so in env: LOG_DRIVER=journald For the jail I've set blac...
4
Mailu Nginx Reverse Proxy error
here my structure and the front docker-compose # Core services front: image: ${DOCKER_ORG:-mailu}/${...
7
MailKit NTLM authentication not working in some cases
It's not in the list of SASL mechanisms that are tried by default but starting with 2.0 you can use ...
3
MimeKit TypeLoadException in version 2.0.3
Off topic but you once asked me which was more secure: OpenPGP vs S/MIME Well based on the Efail exp...
684
laradock Mysql. The server requested authentication method unknown to the client [caching_sha2_password]
alter user 'username'@'localhost' identified with mysql_native_password by 'password'; would fix it....
654
nvidia docker OpenCV Docker error "ImportError: libSM.so.6: cannot open shared object file: No such file or directory"
I fixed this problem on nvcr.io/nvidia/tensorflow:18.12-py3 with (using solution above): ...
457
compose Docker-compose up failing because "port is already allocated"
I ran into the same issue today (with a postgres container) and despite having tried docker-compose ...
447
moby The name "/data-container-name" is already used by container <hash>. You have to remove (or rename) that container to be able to reuse that name.
I have a helper function to nuke everything so that our Continuous blah cycle can be tested erm.. co...
371
compose Compose error "HTTP request took too long to complete"
By simply restarting the docker service via sudo service docker restart I was able to get the aforem...
369
compose error on launching docker-compose by piping to sh ( echo 'docker-compose ... ' | sh )
I could get it to work by adding the -T parameter to not create a Pseudo-TTY docker-compose exec -T ...
337
compose docker-compose up fails if network attached to container is removed
Thanks for the report! I think there are several things to note here: First and foremost ...
316
nvidia docker docker: Error response from daemon: Unknown runtime specified nvidia.
I've also installed correctly but forgot to restart daemon in ubuntu it may resolve your error. ...
297
compose Error when trying to run docker-compose up. "oci runtime error: container_linux.go:247..."
you gotta make the docker-entrypoint.sh an executable before building the image: otherwise it cant b...
292
laradock SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
+1 I'm having the same problem here. Info: Docker version ($ docker --version): Docker version 17.12...
257
compose docker-compose up doesn't pull down latest image if the image exists locally
Imagine that git didn't have pull because git fetch && git merge origin/master is functionally ident...
236
nvidia docker could not select device driver "" with capabilities: [[gpu]].
Hello! If you didn't already make sure you've installed the nvidia-container-toolkit If this doesn't...
205
moby docker-engine 1.10.2-0~trusty can't install on clean Ubuntu 64-bit 14.04.3
I seem to have resolved this by putting deb http://cz.archive.ubuntu.com/ubuntu trusty main in /etc/...
183
moby Docker service update --image "could not accessed on a registry to record its digest"
When updating services that need credentials to pull the image you need to pass --with-registry-auth...
178
laradock MySQL Container fails to start
I had the same issue last night I think it's the mysql version problem What I did was edited laradoc...
169
compose Docker Compose mounts named volumes as 'root' exclusively
Actually I come here with news it seems what I am trying to achieve is doable but I don't know if th...
149
compose INTERNAL ERROR: cannot create temporary directory!
Confirming this happened to me Today Was running low on space: After removing a container.. it works...
147
cookiecutter django No support for python3? I am getting: invalid syntax: raise ValueError, "No frame marked with %s." % fname
For me the issue was that I installed the environ package instead of the django-environ package. ...
147
compose docker-compose up -d doesn't expose ports when defined with build directive
oh you didn't specify but I'm assuming you're using run instead of up? If so you need --service-port...
142
compose How does compose chooses subnet for default network?
I'm also running into this issue Another way around this is to set the default-address-pools in your...
139
ddev In WSL2 ddev start fails at docker-credential-desktop.exe, "error listing credentials"
I had to set credsStore: in my ~/.docker/config.json .. it was previously set to credentials.exe ...
139
docker touch: cannot touch ‘/var/jenkins_home/copy_reference_file.log’: Permission denied
as mentioned there you need to figure out your volume mapping permissions ie. I have the same issue ...
138
kubernetes ingress 413 Request Entity Too Large
FYI the annotation has changed and is now: Also I had to restart the nginx pod for the effect to tak...
127
moby docker daemon unable to access registry - Client.Timeout exceeded while awaiting headers
I found out that the problem might be in /etc/resolv.conf I had: but moving the non-working (yet) 10...
120
cli How to skip one stage from multi-stage docker build
Docker 18.06 has been released Description We have Multistage docker build that creates rpm in each ...
119
compose ERROR: for db Cannot start service db: driver failed programming external connectivity on endpoint ltg_db_1
The following worked for me when i do the following : ± docker-compose up Starting ltg_db_1 ERROR: f...
119
compose Release docker/compose image for armv7 / arm64v8
Last time I checked compose wants python 3 while raspbian's global python is still 2 apt-get install...
116
compose I am having this "Encountered errors while bringing up the project." error
Does running docker-compose down solve the issue? when $ docker-compose up it returns Docker Version...
114
moby docker.service Failed with result 'start-limit-hit'.
I had the same error message once because of an empty /etc/docker/daemon.json file Delete it if you ...
110
rancher Namespace created by rancher can't delete
This is a known issue with removing an imported cluster (and in the process of being fixed) but you ...
106
nvidia docker docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error
sudo apt install nvidia-container-runtime worked for me. The template below is mostly useful for bug...
106
compose "Can't find a suitable configuration file" on Ubuntu 18.04.1
I ran into the same problem with a fresh Ubuntu 18.04 install where I selected Docker from install o...
103
compose How to make a Systemd Unit for docker-compose?
Place following content to the /etc/systemd/system/docker-compose@.service Place you docker-compose....
103
moby containerd: start container" error="oci runtime error: fork/exec /usr/bin/docker (deleted): no such file or directory: "
Not sure if this is the same cause but this might help someone Steps to reproduce the issue: Install...
102
laradock ERROR: 404 page not found
I had this problem because the root path in docker-compose.yml differs from the one in nginx default...
102
moby Error response from daemon: Get https://registry-1.docker.io/v2/
may be you are behind a firewall/proxy server i was also behind my office firewall so i tried below ...
101
generator jhipster Uncaught Error: Module build failed: Error: ENOENT: no such file or directory, scandir '**\node_modules\node-sass\vendor'
@lancurtis run npm rebuild node-sass Hi There was an error occured in my chrome on windows 10 x64 wh...
99
laradock When Using docker-compose up mysql MySQL Doesn't Start
I solved this problem This is because of data folder I was running it using mysql 5.7 then abort it ...
96
compose docker-compose often takes a long time to do anything
For me the solution was to install haveged and it solved the issue out of the box: ...
96
vscode remote release VS Code Server for WSL closed unexpectedly: Input/output error
I just got this issue too I installed the Windows May 2020 Update yesterday and then installed Ubunt...
94
laradock Guzzle/Curl connections between multiple projects
That's literary the only change you need to do not going to post the whole of docker-compose file in...
86
compose The input device is not a TTY
@mhverbakel solution with -T flag (docker-compose exec -T) is a part of the first comment itself but...