Comments (20)
hi,
thank you for your interest. Let's check how to resolve your request.
best reagrds
from cv4pve-admin.
Frank,
I am doing a Follow Up?
Thanks,
Kenneth
from cv4pve-admin.
Sorry, I don't understand. What do you mean?
from cv4pve-admin.
I was Referring to the Request that I made about HTTPS when I started this Post 5 Days Ago.
from cv4pve-admin.
Hello @kenrmayfield,
our development team is working on it, we will update you in this issue.
Best Regards,
from cv4pve-admin.
I was wondering if Creating a NGINX SSL for Docker would Work?
I wanted to see what you think?
I was wondering if there is something in the Code I Manipulated below is missing something or it will not work?
I have Manipulated the Code Below with Steps:
Step 1: Create Directory
Create a directory with the name "docker_ssl_proxy" to store the NGINX Configuration file and the certificate and key
$ mkdir docker_ssl_proxy
Step 2: Change Directory to docker_ssl_proxy
NOTE:
You must be under this directory before executing the following steps (Commands).
Step 2.a: Use Signed Certificates
NOTE:
If you have Certificates you can simply copy the following 2 files to the Current Directory
key.pem
cert.pem
Step 2.b Create the Self-Signed Certificates (If needed)
Use OpenSSL to create a Self-Signed Certificate, following command will create a Self-Signed Certificate and a Private Key with a Validity of 365 days.
$ openssl req -subj '/CN=localhost' -x509 -newkey rsa:4096 -nodes -keyout key.pem -out cert.pem -days 365
Step 3: Find your container IP address
3.1: Find your Container ID.
$ docker ps
NOTE:
It will list all the processes that are running and find out your Container Id.
3.2 Find IP Address
To find the container IP address from the Host, you can run the command
NOTE:
(Container-ID): replace this with the value that you get from Step 3.1
$ docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' (Contrainer-ID)
NOTE:
The response of the above command will be an IP address
Step 4: Create the NGINX configuration file
In the same directory (docker_ssl_proxy), create a Configuration File that will Proxy All the Traffic to your upstream server. The upstream server is the application server running a non-SSL connection. The SSL will be using NGINX, and all the traffic will be Proxied to the Host (using the IP Address that you got in Step 3.2)
The Configuration File, which in this example is called "proxy_ssl.conf," but can have any name as long as it ends in .conf.
Example file: proxy_ssl.conf
NOTE: 5000 is the Port for CV4PVE-ADMIN.
The only thing you need to replace in this file is the Container IP Address.
This file simply instructs NginX to listen, with SSL and the correct Certs and Keys, on port 443 and to proxy all the requests to the Host on port 5000.
The File must have the following Contents below:
server {
listen 443;
ssl on;
ssl_certificate /etc/nginx/conf.d/cert.pem;
ssl_certificate_key /etc/nginx/conf.d/key.pem;
location / {
proxy_pass http://(Container IP):5000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
}
}
NOTE:
This file simply instructs NginX to listen, with SSL and the correct Certs and Keys, on port 443 and to Proxy All the Requests to the Host on port 5000
Step 5: Run the Docker Container
At this point, we have all the Configuration in place to Proxy the Traffic; we simply need to run the Docker Container with the following command.
$ docker run --name nginx_proxy -d -v pwd:/etc/nginx/conf.d -p 443:443 nginx
NOTE: 5000 is the Port for CV4PVE-ADMIN
If you face issues, try to replace PWD in the command above with the Full Directory Path for "docker_ssl_proxy", where you have Config and Cert files.
$docker run --name nginx_proxy -d -v (yourdirectory):/etc/nginx/conf.d -p 443:443 nginx
from cv4pve-admin.
you could use a docker compose
from cv4pve-admin.
@matteocv
Frank,
On my Previous Posting........what did you think about the Code to try to get HTTPS to work?
As far as Docker Compose...........It will be the same Problem.........still No HTTPS. Even if you use a Container, that does not change the Protocol.
from cv4pve-admin.
hi,
I didn't enable Forwarded. In the next release we will come up with an example for Nginx
best reagrds
from cv4pve-admin.
see https://github.com/Corsinvest/cv4pve-admin/tree/main/src/Docker/Nginx/ReverseProxy
from cv4pve-admin.
Frank,
I Sent you and Matteo a Email asking a Question about the Reverse Proxy.
from cv4pve-admin.
Frank,
I was checking back on Previous Comment.
from cv4pve-admin.
Frank,
Sent Response Email.
from cv4pve-admin.
Frank,
Sent Response Email. Checking back with you Guys.
from cv4pve-admin.
Hi,
if you want attach the docker code for HTTPS.
best regards
from cv4pve-admin.
News?
from cv4pve-admin.
Still having a Problem getting HTTPS to work?
I tried: https://github.com/Corsinvest/cv4pve-admin/tree/main/src/Docker/Nginx/ReverseProxy
from cv4pve-admin.
Still having a Problem getting HTTPS to work?
I tried: https://github.com/Corsinvest/cv4pve-admin/tree/main/src/Docker/Nginx/ReverseProxy
from cv4pve-admin.
Still having a Problem getting HTTPS to work?
I tried: https://github.com/Corsinvest/cv4pve-admin/tree/main/src/Docker/Nginx/ReverseProxy
Set up a SWAG reverse proxy, HTTPS over port 5000. SSL all setup fine. Errors suggest the backend docker for CV4PVE seems to be incompatible with running in HTTPS in some manner.
Seeing in browser console:
Uncaught (in promise) WebSocket is not in the OPEN state
[2023-10-24T17:50:53.720Z] Error: System.Threading.Tasks.TaskCanceledException: A task was canceled.
at Microsoft.JSInterop.JSRuntime.InvokeAsync[TValue](Int64 targetInstanceId, String identifier, Object[] args)
at Microsoft.JSInterop.JSRuntimeExtensions.InvokeVoidAsync(IJSRuntime jsRuntime, String identifier, Object[] args)
at Microsoft.AspNetCore.Components.Server.Circuits.RemoteNavigationManager.<>c__DisplayClass13_0.<<NavigateToCore>g__PerformNavigationAsync|0>d.MoveNext()
Seeing in docker logs:
[ERR] Navigation failed when changing the location to /login?key=d3f0d667-c2c7-4e7e-8676-REDACTED
from cv4pve-admin.
I found and fixed the problem for reverse proxy.
from cv4pve-admin.
Related Issues (20)
- No definition for 'data' HOT 2
- Can not get nvme disk status In Utilities->Disks Status HOT 3
- Diagnostic Notifications
- WebHook notification HOT 1
- Timeout connection
- Seems one of my Proxmox Nodes doesn't report properly, failing with "Sequence contains no elements" HOT 4
- CV4PVE-ADMIN Install on CentOS 8 HOT 26
- Power Off/On Cluster Nodes
- net7.0 does not exist HOT 1
- Darkmode HOT 4
- Install on the PVE host will let PVE web can't access HOT 9
- Hello,I want know how to reset my password HOT 15
- Improve VzDump Trend
- systemctl start cv4pve-admin bug. HOT 7
- App Crash Randomnly on Windows Machine HOT 4
- Update GUI - english HOT 2
- User creation password system only works when entering password, making password manager useless HOT 1
- Health Check is giving false flags HOT 4
- Date/Time - Timezone set to UTC and shows AutoSnap next scheduled snapshot time not in my timezone HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cv4pve-admin.