Skip to content

Digitalocean step by step guide to nginx configuration

Solved Configure

Did this solution help you?
Did you find the suggested solution useful? Why not buy me a coffee? It's a nice gesture, and a great way to show your appreciation 💗

  • 2 Votes
    4 Posts
    176 Views

    Seems that before FreeNGINX, there was “Angie” - a strange name for a fork of Nginx, but here it is nonetheless

    https://angie.software/en/

    Features

    Core advantages over nginx include the following:

    Supporting HTTP/3 for client connections, as well as for proxied server connections, with the ability to independently use different protocol versions (HTTP/1.x, HTTP/2, HTTP/3) on opposite sides. Automatic HTTPS provisions TLS certificates using built-in ACME support. Simplifying configuration: the location directive can define several matching expressions at once, which enables combining blocks with shared settings. Exposing basic information about the web server, its configuration, as well as metrics of proxied servers, client connections, shared memory zones, and many other things via a RESTful API interface in JSON format. Exporting statistics in Prometheus format with customizable templates. Monitoring the server through the browser with the Console Light visual monitoring tool. See the online demo: https://console.angie.software/ Automatically updating lists of proxied servers matching a domain name or retrieving such lists from SRV DNS records. Session binding mode, which directs all requests within one session to the same proxied server. Recommissioning upstream servers after a failure smoothly using the slow_start option of the server directive. Limiting the MP4 file transfer rate proportionally to its bitrate, thus reducing the bandwidth load. Extending authorization and balancing capabilities for the MQTT protocol with the mqtt_preread directive under stream. Pre-built binary packages for many popular third-party modules. Server- and client-side support for NTLS when using the TongSuo TLS library, enabled at build time.

    Judging by these new features, this specific fork seems very active with updates once per quarter.

  • 4 Votes
    11 Posts
    369 Views

    @Hari Really? Can you elaborate a bit more here?

  • Is nginx necessary to use?

    Moved Solved Hosting
    2
    1 Votes
    2 Posts
    145 Views

    @Panda said in Cloudflare bot fight mode and Google search:

    Basic question again, is nginx necessary to use?

    No, but you’d need something at least to handle the inbound requests, so you could use Apache, NGINX, Caddy… (there are plenty of them, but I tend to prefer NGINX)

    @Panda said in Cloudflare bot fight mode and Google search:

    Do these two sites need to be attached to different ports, and the ports put in the DNS record?

    No. They will both use ports 80 (HTTP) and 443 (HTTPS) by default.

    @Panda said in Cloudflare bot fight mode and Google search:

    Its not currently working, but how would the domain name know which of the two sites to resolve to without more info?
    Currently it only says the IP of the whole server.

    Yes, that’s correct. Domain routing is handled (for example) at the NGINX level, so whatever you have in DNS will be presented as the hostname, and NGINX will expect a match which once received, will then be forwarded onto the relevant destination.

    As an example, in your NGINX config, you could have (at a basic level used in reverse proxy mode - obviously, the IP addresses here are redacted and replaced with fakes). We assume you have created an A record in your DNS called “proxy” which resolves to 192.206.28.1, so fully qualified, will be proxy.sudonix.org in this case.

    The web browser requests this site, which is in turn received by NGINX and matches the below config

    server { server_name proxy.sudonix.org; listen 192.206.28.1; root /home/sudonix.org/domains/proxy.sudonix.org/ogproxy; index index.php index.htm index.html; access_log /var/log/virtualmin/proxy.sudonix.org_access_log; error_log /var/log/virtualmin/proxy.sudonix.org_error_log; location / { proxy_set_header Access-Control-Allow-Origin *; proxy_set_header Host $host; proxy_pass http://localhost:2000; proxy_redirect off; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Api-Key $http_x_api_key; } location /images { index index.php index.htm index.html; root /home/sudonix.org/domains/proxy.sudonix.org/ogproxy; } fastcgi_split_path_info "^(.+\.php)(/.+)$"; listen 192.206.28.1:443 ssl http2; ssl_certificate /home/sudonix.org/domains/proxy.sudonix.org/ssl.combined; ssl_certificate_key /home/sudonix.org/ssl.key; }

    The important part here is server_name proxy.sudonix.org; as this is used to “map” the request to the actual domain name, which you can see in the root section as root /home/sudonix.org/domains/proxy.sudonix.org/ogproxy;

    As the DNS record you specified matches this hostname, NGINX then knows what to do with the request when it receives it.

  • 1 Votes
    3 Posts
    259 Views

    @Hari welcome to Grafana, the most confusing stats package there is !

    According to the guidelines, you certainly have enough RAM at 4gb

    https://www.plesk.com/blog/various/plesk-requirements-hardware-software/

  • Configure SMTP for Nodebb

    Solved Configure
    14
    5 Votes
    14 Posts
    782 Views

    @marusaky based on the work completed thus far (in relation to PM exchanges), I’m going to mark this completed. Sending email from the server itself works fine without issue, and DNS appears to be clean (valid SPF, DMARC, and DKIM records).

    It appears that only Gmail marks incoming messages from your domain as spam - perhaps because of the domain age, which there is nothing we can do to prevent this. Mail delivery to all other domains appears to work fine in al of my tests.

  • 0 Votes
    3 Posts
    262 Views

    See https://sudonix.com/topic/226/issues-getting-flarum-to-work-on-new-host/28?_=1645013723672

  • nginx can't start again

    Moved Solved Configure
    20
    2 Votes
    20 Posts
    928 Views

    @elhana-fine Yes that will happen of of course if you still choose to restart the NGINX service after making a change and the test fails. The test on it’s own will state the error and the line number allowing you to fix that first 🙂

  • is my DMARC configured correctly?

    Solved Configure
    3
    3 Votes
    3 Posts
    324 Views

    @phenomlab said in is my DMARC configured correctly?:

    you’ll get one from every domain that receives email from yours.

    Today I have received another mail from outlook DMARC, i was referring to your reply again and found it very helpful/informative. thanks again.

    I wish sudonix 100 more great years ahead!