# Nginx Reverse Proxy Conflict with Cells on Port 443

**URL:** <https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010>\
**Category:** Pydio Cells\
**Created:** [September 2, 2024, 2:10pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010 "2024-09-02T14:10:59Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![lubovic](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/lubovic/32/941_2.png) [@lubovic](https://forum.pydio.com/u/lubovic)\
**Post date:** [September 2, 2024, 2:10pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/1 "2024-09-02T14:10:59Z")

</div>

Hello everyone,

I am using cells installed with systemctl on a debian server.  
I also have nginx, also installed with systemctl, for reverse proxying.

I’m sorry to post this here, as it might not be due to cells, but I’m really stuck.

I am encountering an issue. I have several reverse proxies configured, and usually, it works well because I add a different port. But this time, for an application I need to configure, I am forced to use port 443, just like cells.  
However, I am indeed on a different subdomain from cells.

Like cells is : [cloud.ndd.fr](http://cloud.ndd.fr)  
And my app is : [app.ndd.fr](http://app.ndd.fr)

Here is an Nginx config file:

```auto
server {
    listen 80;
    listen 443 ssl;
    server_name app.ndd.fr;
    ssl_certificate /etc/letsencrypt/live/app.ndd.fr/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/app.ndd.fr/privkey.pem;
    location / {
        proxy_pass http://localhost:1234;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

```

It is functional, I can access this server, but the problem is that I have to stop cells:

`sudo systemctl stop cells`

If I do not stop cells, then my Nginx will not start: `bind() to 0.0.0.0:443 failed (98: Address already in use)`

Because cells is already listening on port 443.

Is there a way to access my two different subdomains without having to specify a port?  
I can’t find a solution.

Thank you!

---

<div class="post-metadata">

**Author:** ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)\
**Post date:** [September 2, 2024, 3:44pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/2 "2024-09-02T15:44:56Z")

</div>

Yes, you can only bind one app to a given port.

In such case, I usually also use the nginx as the reverse proxy for cells.

You could then use `cells configure sites` to define another unused port and add a stanza in nginx to forward the traffic to the correct port depending on the subdomain.

Would this work for you ?

---

<div class="post-metadata">

**Author:** ![lubovic](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/lubovic/32/941_2.png) [@lubovic](https://forum.pydio.com/u/lubovic)\
**Post date:** [September 2, 2024, 3:50pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/3 "2024-09-02T15:50:04Z")

</div>

Ah ok, I understand better. Actually, I can only bind one port either to nginx or to the integrated server of cells.  
But if I route everything through nginx, then it’s no longer a problem and I can associate the same port multiple times but with different subdomain names, right?  
If the result is that:  
[cloud.ndd.fr](http://cloud.ndd.fr) and [app.ndd.fr](http://app.ndd.fr) point transparently without adding a port in the URL, then yes, that works for me.

So I need to disable the integrated reverse proxy in cells and use nginx for cells?

Thanks a lot!

---

<div class="post-metadata">

**Author:** ![lubovic](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/lubovic/32/941_2.png) [@lubovic](https://forum.pydio.com/u/lubovic)\
**Post date:** [September 10, 2024, 9:08am UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/4 "2024-09-10T09:08:38Z")

</div>

Hello,

I do not understand what is wrong with my `cells configure sites`.

This is what I have:

The following sites are currently defined:  
±–±-------------------------±-------±---------------------+  
| # | BIND(S) | TLS | EXTERNAL URL |  
±–±-------------------------±-------±---------------------+  
| 0 | [http://cloud.ndd.fr:8080](http://cloud.ndd.fr:8080) | No Tls | [https://cloud.ndd.fr](https://cloud.ndd.fr) |  
±–±-------------------------±-------±---------------------+

```
"sites": [
  {
    "Binds": [
      "cloud.ndd.fr:8080"
    ],
    "ReverseProxyURL": "https://cloud.ndd.fr",
    "TLSConfig": null
  }
],

```

But cells is still occupying port 443, and I cannot start Nginx. ☹  
However I can access cells like before!

Here is what I see in my admin interface; it looks like `cells` is not taking the config file into account?

 ![cells config](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/1/198e04d81a26828f34dbb020814c4b36aa83fc8b.png)

---

<div class="post-metadata">

**Author:** ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)\
**Post date:** [September 13, 2024, 1:44pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/5 "2024-09-13T13:44:07Z")

</div>

Hmm sorry for the late reply.

Maybe dumb question, but are you sure you restarted the server **after** doing the change via `cells configure site` ???

Otherwise there must be another issue somewhere: the 2 values (in the web and in the console) should be the same…

---

<div class="post-metadata">

**Author:** ![lubovic](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/lubovic/32/941_2.png) [@lubovic](https://forum.pydio.com/u/lubovic)\
**Post date:** [September 13, 2024, 2:01pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/6 "2024-09-13T14:01:40Z")

</div>

No problem for the time 🙂

I’m restarting cells with : sudo systemctl restart cells  
I guess its restarting the cells server as well ?

---

<div class="post-metadata">

**Author:** ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)\
**Post date:** [September 16, 2024, 8:06am UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/7 "2024-09-16T08:06:58Z")

</div>

Hmm. Very strange.

> I guess its restarting the cells server as well ?

Yep.

I could see 2 others things that might lead to this situation:

- Do you have the CELLS\_BIND and/or CELLS\_EXTERNAL env variable defined ?
- Are you sure you are using the correct user and working dir (the ones defined in your systemd config file) ?

Otherwise, you might find some clue at the start of the log, when you restart the server.

---

<div class="post-metadata">

**Author:** ![lubovic](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/lubovic/32/941_2.png) [@lubovic](https://forum.pydio.com/u/lubovic)\
**Post date:** [September 18, 2024, 7:25am UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/8 "2024-09-18T07:25:43Z")

</div>

Hello,

Thank you, that was exactly it! I was actually using the root user.  
When I was using root user, it was launching another configuration of: cells configure site  
Similarly, when I manually edited the config file, it was the one associated with root…

Switching to my cells user gave me access to the correct configuration.

Thank you very much.

---

<div class="post-metadata">

**Author:** ![bsinou](https://yyz2.discourse-cdn.com/flex032/user_avatar/forum.pydio.com/bsinou/32/476_2.png) [@bsinou](https://forum.pydio.com/u/bsinou)\
**Post date:** [September 18, 2024, 9:54am UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/9 "2024-09-18T09:54:00Z")

</div>

I won’t say it never happened to me 😊

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex032/uploads/pydio/original/2X/6/61f19fa52ec15fd4250db51aea351adba0e831fd.png) [@system](https://forum.pydio.com/u/system)\
**Post date:** [September 29, 2024, 3:54pm UTC](https://forum.pydio.com/t/nginx-reverse-proxy-conflict-with-cells-on-port-443/6010/10 "2024-09-29T15:54:40Z")

</div>

Closed on September 29, 2024, 3:54pm UTC

This topic was automatically closed 11 days after the last reply. New replies are no longer allowed.
