0 votes
308 views
by Rookie
Two questions:

Is it OK to install Webinoly alongside Docker? Mainly for reverse proxy, but also a Wordpress website or two.

If yes, to use Webinoly as a reverse proxy for Docker, to get an SSL certificates, where do I point the root path?

I know there may be Docker solutions for Nginx reverse proxy, but I do really like using Webinoly, and would like to continue.

Thank you...

2 Answers

0 votes
by Expert
First of all, you don't need docker to use Nginx as reverse proxy, with Webinoly we have an option to create a site as reverse proxy. Read the docs!

Or maybe I'm not understanding your question, can you explain how do you plan to integrate Webinoly with docker?

The root-path for reverse proxy SSL is where your web public data is stored in the reverse proxy location, similar to "htdocs" for regular sites.
by Rookie
I would like to use Webinoly for reverse proxy for the Docker container apps that I install.
by Expert
Ok. Yes, you can use Webinoly that way to access your installed docker apps, maybe you only will have to change the "proxy_pass" parameter in your site-conf to point to your app.

To be honest, I've never did it, but should not have any issues.

Do it and tell us about your experience, this way other users can read about it.

Regards.
by Rookie
Thanks, I will give it a try and let you know.

I have become used to Webinoly so instead of using a Docker reverse proxy option, I'd really like to stay with Webinoly. Thanks to you for this wonderful option.

I have never used Docker before, but seems something worth getting into. I don't even know how mixing Docker containers apps with manual installed apps will be like?

I have used Webinoly as a reverse proxy before with manual installed apps, all was fine. But for Docker, I hope it goes well. The only thing that confuses me beforehand is for the “-root-path” of the Docker app for the SSL certificates on reverse proxy?
by Expert
Thanks a lot for your kind support!

Please, don't hesitate to ask any questions.
0 votes
by Rookie
edited by

Hi, to reverse proxy using Webinoly, SSL, and Docker, you'll first need to create a site. For some reason, site domain.tld -proxy=[localhost:3000] doesn't work, it will give an error: no matches found: --proxy=[localhost:3000].

Below is an example of running https://rocket.chat in a docker container:

  1. sudo site domain.tld -html
  2. sudo site domain.tld -ssl=on (assuming DNS has propagated)
  3. sudo nano /etc/nginx/sites-available/domain.tld (copy contents below and change domain.tld and/or port)
  4. sudo webinoly -server-reset
  5. cd /path/to/rocketchat && docker-compose up -d

# Upstreams

upstream domain.tld {

    # Change to whatever port you set in the docker container or docker-compose.yml

    server 127.0.0.1:3000;

}

# WebinolySSLredirectStart - HTTP to HTTPS Redirect

server {

listen 80;

listen [::]:80;

server_name domain.tld www.domain.tld;

return 301 https://$host$request_uri;

}

# WebinolySSLredirectEnd

# WebinolyNginxServerStart

server {

listen 443 ssl http2;

listen [::]:443 ssl http2;

server_name domain.tld www.domain.tld;

# WebinolySSLstart

ssl_certificate /etc/letsencrypt/live/domain.tld/fullchain.pem;

ssl_certificate_key /etc/letsencrypt/live/domain.tld/privkey.pem;

ssl_stapling on;

ssl_stapling_verify on;

ssl_trusted_certificate /etc/letsencrypt/live/domain.tld/chain.pem;

# WebinolySSLend

access_log /var/log/nginx/domain.tld.access.log we_log; 

error_log /var/log/nginx/domain.tld.error.log;

#root /var/www/domain.tld/htdocs;

#index  index.html index.htm;

#location / { try_files $uri $uri/ =404; }

#include common/locations.conf;

include common/headers-http.conf;

include common/headers-https.conf;

#include common/headers-html.conf;

include /var/www/domain.tld/*-nginx.conf;

location / {

        proxy_pass http://domain.tld/;

        proxy_http_version 1.1;

        proxy_set_header Upgrade $http_upgrade;

        proxy_set_header Connection "upgrade";

        proxy_set_header Host $http_host;

        proxy_set_header X-Real-IP $remote_addr;

        proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;

        proxy_set_header X-Forward-Proto http;

        proxy_set_header X-Nginx-Proxy true;

        proxy_redirect off;

    }

}

# WebinolyNginxServerEnd

by Expert
Hi, I'm pretty sure "proxy" command is working as expected in Webinoly. Can you describe the error you are getting?
by Rookie

Hi, seems like zsh doesn't play well with the -proxy command. It works when I switch back to a bash shell.

cim@ubuntu-s-2vcpu-4gb-sfo2-01  ~  site domain.tld -proxy=[localhost:3000]

zsh: no matches found: -proxy=[localhost:3000]

✘ cim@ubuntu-s-2vcpu-4gb-sfo2-01  ~  exit

cim@ubuntu-s-2vcpu-4gb-sfo2-01:~$ site domain.tld -proxy=[localhost:3000]

Site domain.tld has been successfully created!

 Custom host found: localhost

 Custom port found: 3000

[WARNING] Seems like your host/port is not responding!

cim@ubuntu-s-2vcpu-4gb-sfo2-01:~$

by Expert
Ohhh, sorry!

Yes, I didn't note that you were using ZSH.

Webinoly is written in Bash and only tested in Bash, so sure you will find so many inconsistencies using a different shell.

Regards.
by Rookie
Yeah no problem, error was on my end. Btw, I am coming from EasyEngine and WordOps. I am impressed with Webinoly. It's much more refined than the others, especially the proxy feature. Great work!
by Expert
Thanks for your kind words.

I'm sure you will have a much better experience with Webinoly.
Welcome to the Community site for Webinoly.

If you have a question about Webinoly, please ask in English or Spanish.

To report a bug, please ask a question here with the bug tag.

News: Now you can use any external SMTP service in your server. All the server outgoing emails from any of your websites will be sent through this service.

Donations

Webinoly Support Paypal Donations Webinoly Support Bitcoin Donations

Your regular donations is what keep this project moving forward. If you like Webinoly, buy me a coffee or a beer to show support.

Affiliate Links

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...