Web application using gunicorn in nginx server not working

I had 3 apps in a server running on Ubuntu 22.04. The first one was a Django app, the second a Flask appp under a subdomain and the third one a FastAPI under another subdomain. When I tried to add a fourth one (Flask) I don’t know how I messed up but now none of them work. All the apps run perfectly in my computer.
When I try to access the page through the browser in my computer it returns ERR_CONNECTION_REFUSED and when accessing throught my phone it returns a 502 Bad Gateway nginx/1.18.0 (Ubuntu) error. The first one doesn’t log anything in the nginx’s error.log but the second one does.

My current server config is as follows:

server { 
    server_name host.es www.host.es; 
    location ~ /.ht { deny all; }
    location ~/.git { deny all; }
    location = /favicon.ico { access_log off; log_not_found off; }
    location /media { alias /var/www/host.es/myapp/media; }
    location /static { alias /var/www/host.es/myapp/static; }
    location / {
        include proxy_params;
        proxy_pass http://unix:/run/myapp.sock;
    }
    # The next configuration applies to the 3 subdomain apps
    location /subdomain1 {
        include porxy_params;
        proxy_set_header SCRIPT_NAME /subdomain1;
        proxy_pass https://unix:/run/mysecondapp.sock;
    }
}
server {
    if ($host = www.host.es) {
        return 301 https://$host$request_uri;   
    }
    if ($host =host.es) {
        return 301 https://$host$request_uri;   
    }
    listen 80;
    server_name onemade.es www.onemade.es;
    return 404;
}

My Django service which is the main app is as follows:

[Unit]
Description=Gunicorn for app
Requires=myapp.sock
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/path/to/myapp
ExecStart=/path/to/myapp/env/bin/gunicorn --workers 3 --preload --bind unix:/run/myapp.sock myapp.wsgi:application

[Install]
WantedBy=multi-user.target

My Flask services which are in subdomains are as follows:

[Unit]
Description=Gunicorn for app
Requires=mysecondapp.sock
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/path/to/mysecondapp
ExecStart=/path/to/mysecondapp/env/bin/gunicorn --workers 3 --preload --bind unix:/run/mysecondapp.sock web.wsgi:app

[Install]
WantedBy=multi-user.target

All sockets have the same configuration

[Unit]
Description=My apps socket

[Socket]
ListenStream=/run/myapp.sock
SocketUser=www-data

[Install]
WantedBy=sockets.target

And both .sockets and .service files are owned by the root user and stored in /etc/systemd/system/

The .sock files are found in /run/ and are owned by www-data.

When running the below commands for all the services and sockets they are active and without any errors and same with nginx.

sudo systemctl start
sudo systemctl enable
sudo systemctl status

Under the sudo journalctl command everything works fine. When checking the /var/log/nginx/access.log it shows a 502 error when trying to GET the page. When checking the /var/log/nginx/error.log it shows the next line:
connect() to unix:/bin/myapp.sock failed (2: No such file or directory) while connecting to upstream

In the error it seams like nginx is looking for the .sock file in the /bin directory instead of the /run directory. I don’t understand why is this happening or why it changed when trying to add a new app.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật