nginx cloudflare tutorial benötigt

Started by Xyz00777, April 14, 2020, 07:40:04 PM

Previous topic - Next topic
Hallöchen Leute :)
habe da ein kleines problem...
ich komme einfach nicht weiter...
ich habe hier diesen post mit kleiner anleitung gefunden nur komme ich trotzdem nicht weiter...
Quote from: anomaly0617 on December 23, 2019, 04:50:08 PM
From Google Translate, since I'm terrible at German :) :

QuoteThe rewrite rule belongs off and leave the location on / match and match type empty, since the VHosts are mapped with the server names via different HTTP servers.

Ok, with this advice I got one server proxy working. I'll attempt more later today. Here's what I did to make it work...

Services: NGINX: Configuration: General
-- Enable nginx: Checked

Services: NGINX: Configuration: Upstream Server (1 Entry)
-- Description: Server1
-- Server: 192.168.xxx.zzz
-- Port: 8091 (later moved to 80, after I got it working)
-- Server Priority: 1

Services: NGINX: Configuration: Upstream (1 Entry)
-- Description: com_siteb
-- Server Entries: Server1
-- Load Balancing Algo: Weighted Round Robin
-- Enable TLS: Unchecked
-- TLS: Servername override: [Blank]
-- TLS: Supported Versions: [Nothing Selected]
-- TLS: Session Reuse: [Checked] (I think by default)
-- TLS: Trusted Certificate: [Nothing Selected]

Services: NGINX: Configuration: HTTP(S): Location (1 Entry)
-- Description: com_siteb
-- URL Pattern: /
-- Match Type: None
-- URL Rewriting: [Nothing Selected]
-- Enable Security Rules: [Not Checked]
-- Learning Mode: [Not Checked]
-- Block XSS Score: [Blank]
-- Block SQL Injection Score: [Blank]
-- Custom Security Policy: [Nothing Selected]
-- Upstream Servers: com_siteb
-- Path Prefix: [Blank]
-- Cache: Directory: [none]
-- File System Room: [Blank]
-- Index File: [Blank]
-- Automatic Index: [Not Checked]
-- Basic Authentication: [Blank]
-- Basic Credentials List: [None]
-- Enable Advanced ACLs: [Unchecked]
-- IP ACL: [None]
-- Force HTTPS: [Unchecked]
-- Enable HTTP/2 Preloading: [Unchecked]
-- Pass Request To Local PHP Interpreter / Threat Upstream As FastCGI: [Unchecked]
-- (PHP) Router Script: [Blank]

Services: NGINX: Configuration: HTTP(S): HTTP Server (1 Entry)
-- HTTP Listen Port: 8091 (Later changed to 80)
-- HTTPS Listen Port: [Blank]
-- Server Name: 192.168.xxx.zzz
-- Locations: com_siteb
-- URL Rewriting: Nothing Selected
[Everything else left to defaults]


This section was completely deleted
Services: NGINX: Configuration: HTTP(S): URL Rewriting (1 Entry)
-- Short description (to display): root
-- Original URL Pattern (Regex): /
-- New URL Pattern: $1
-- Flag: Redirect


After a restart of NGINX, It routes! Thanks, Fabian!

Ich möchte ein full encrypted reverse proxy (mit origin zertifikat) zu cloudflare haben nur bekomme ich das mit nginx nicht hin :-\
hat mir jemand eine anleitung zur verfüfung stellen wie ich das hinbekomme? habe 3 web seiten die ich verfügbar haben möchte alle mit der selben domain aber drei unterschiedlichen subdomains. außerdem möchte ich halt das alles an außgehendem datenverkehr über den cloudflare proxy geht (ist ja der sinn von einem reverse proxy wenn ich mich nicht vertue)
ich würde mich super duper mega freuen wenn mir jemand helfen kann...

Grüße
Xyz00777

Wenn der HTTPS Listen port gesetzt ist (z. B. 443) und ein Zertifikat samt key da ist, ist der Port offen und HTTPS geht. Soviel zur ersten Frage. Die Zweite musst du über Firewall-Regeln lösen. Eingehend Pass auf nginx nur vom IP-Pool von Cloud flare zulassen.

PS: Für CF habe ich auch real IP support eingebaut, dass deine Logs auch stimmen.