Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate reverse proxy configuration #170

Open
Ndpnt opened this issue Oct 23, 2024 · 0 comments
Open

Automate reverse proxy configuration #170

Ndpnt opened this issue Oct 23, 2024 · 0 comments
Labels

Comments

@Ndpnt
Copy link
Member

Ndpnt commented Oct 23, 2024

The reverse proxy configuration is currently set up manually by adding specific server blocks to the NGINX configuration, including the subdomain, SSL certificates, and backend port.

To configure the reverse proxy manually:

  • Add the following content (and replace subdomain and port placeholder) to the file /etc/nginx/sites-enabled/ota:
server {
  server_name <SUBDOMAIN>.opentermsarchive.org;
  listen 80;

  return 301 http://51.89.227.200$request_uri;
}

server {
  server_name <SUBDOMAIN>.opentermsarchive.org;
  listen 443 ssl http2;

  ssl_certificate /etc/letsencrypt/live/<SUBDOMAIN>.opentermsarchive.org/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/<SUBDOMAIN>.opentermsarchive.org/privkey.pem;
  ssl_session_timeout 1d;
  ssl_protocols TLSv1.2 TLSv1.3;
  ssl_ciphers 'ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256';
  ssl_prefer_server_ciphers on;
  ssl_session_cache shared:SSL:50m;

  location / {
    proxy_pass http://51.89.227.200:<PORT>$request_uri;
  }
}
@Ndpnt Ndpnt added the ops label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant