mirror of
https://github.com/ditatompel/insights.git
synced 2025-01-08 03:12:06 +07:00
Compare commits
No commits in common. "5c40b9fdd5de2bd43d59b8941a0c576746f1d725" and "d0d127c893e17e4e577d961fee878de2dfca242c" have entirely different histories.
5c40b9fdd5
...
d0d127c893
2 changed files with 20 additions and 20 deletions
|
@ -53,7 +53,7 @@ Sempurna sudah, semua fitur yang saya butuhkan terpenuhi oleh Nginx. Dan saatnya
|
|||
|
||||
{{< bs/alert info >}}
|
||||
{{< bs/alert-heading "INFO:" >}}
|
||||
Saya memiliki open-source project {{< bs/alert-link "nginx-kickstart" "https://github.com/ditatompel/nginx-kickstart" >}} (boilerplate) untuk mempermudah menginstall Nginx dari repositori officialnya dan mengkompile Nginx VTS module di FRESH Debian 12 atau Ubuntu 22.04 server.
|
||||
Saya memiliki open-source project {{< bs/alert-link "ngx-kickstart" "https://github.com/ditatompel/ngx-kickstart" >}} (boilerplate) untuk mempermudah menginstall Nginx dari repositori officialnya dan mengkompile Nginx VTS module di FRESH Debian 12 atau Ubuntu 22.04 server.
|
||||
{{< /bs/alert >}}
|
||||
|
||||
## Installasi Nginx (Official Repo)
|
||||
|
@ -121,25 +121,25 @@ http {
|
|||
|
||||
## Mempersiapkan struktur direktori Nginx
|
||||
|
||||
Buat direktori `sites-available`, `sites-enabled`, `certs`, `snippets` di dalam direktori `/etc/nginx` dengan menjalankan perintah:
|
||||
Buat direktori `sites-available`, `sites-enabled`, `ssl`, `snippets` di dalam direktori `/etc/nginx` dengan menjalankan perintah:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,certs,snippets}
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,ssl,snippets}
|
||||
```
|
||||
|
||||
Buat _self-signed certificate_ (hanya digunakan sebagai konfigurasi awal yang nantinya digantikan oleh `certbot`):
|
||||
|
||||
```shell
|
||||
sudo openssl req -x509 -newkey rsa:4096 -days 365 -nodes \
|
||||
-keyout /etc/nginx/certs/privkey.pem \
|
||||
-out /etc/nginx/certs/fullchain.pem \
|
||||
-keyout /etc/nginx/ssl/privkey.pem \
|
||||
-out /etc/nginx/ssl/fullchain.pem \
|
||||
-subj '/CN=example.local/O=My Organization/C=US'
|
||||
```
|
||||
|
||||
Buat _DH-param_ dengan menjalankan perintah:
|
||||
|
||||
```shell
|
||||
sudo openssl dhparam -out /etc/nginx/certs/dhparam.pem 2048
|
||||
sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
|
||||
```
|
||||
|
||||
## Cloudflare IP Trusted Proxy
|
||||
|
@ -151,7 +151,7 @@ Buat _executable shell script_ `/etc/nginx/cloudflare-ips.sh` berikut:
|
|||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Nginx setup for cloudflare's IPs.
|
||||
# https://github.com/ditatompel/nginx-kickstart/blob/main/etc/nginx/cloudflare-ips.sh
|
||||
# https://github.com/ditatompel/ngx-kickstart/blob/main/etc/nginx/cloudflare-ips.sh
|
||||
# This is modified version of itsjfx's cloudflare-nginx-ips
|
||||
# Ref of original script:
|
||||
# https://github.com/itsjfx/cloudflare-nginx-ips/blob/master/cloudflare-ips.sh
|
||||
|
@ -373,7 +373,7 @@ Configure dengan argumen yang sama dari output `nginx -V` diatas dan tambahkan `
|
|||
_Build_, kemudian copy VTS module yang baru saja dicompile ke `/etc/nginx/modules/`:
|
||||
|
||||
```shell
|
||||
make modules -j$(nproc)
|
||||
make -j$(nproc)
|
||||
sudo cp objs/ngx_http_vhost_traffic_status_module.so /etc/nginx/modules/
|
||||
```
|
||||
|
||||
|
@ -429,12 +429,12 @@ server {
|
|||
|
||||
## Konfigurasi Akhir
|
||||
|
||||
Sebagai referensi konfigurasi akhir, silahkan lihat di repositori [https://github.com/ditatompel/nginx-kickstart/tree/main/etc/nginx](https://github.com/ditatompel/nginx-kickstart/tree/main/etc/nginx).
|
||||
Sebagai referensi konfigurasi akhir, silahkan lihat di repositori [https://github.com/ditatompel/ngx-kickstart/tree/main/etc/nginx](https://github.com/ditatompel/ngx-kickstart/tree/main/etc/nginx).
|
||||
|
||||
## Kredit dan Referensi
|
||||
|
||||
- [https://nginx.org/en/linux_packages.html](https://nginx.org/en/linux_packages.html).
|
||||
- [https://github.com/vozlt/nginx-module-vts](https://github.com/vozlt/nginx-module-vts).
|
||||
- [https://github.com/itsjfx/cloudflare-nginx-ips](https://github.com/itsjfx/cloudflare-nginx-ips).
|
||||
- [https://github.com/ditatompel/nginx-kickstart](https://github.com/ditatompel/nginx-kickstart).
|
||||
- [https://github.com/ditatompel/ngx-kickstart](https://github.com/ditatompel/ngx-kickstart).
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ It's perfect, all the features I need are met by Nginx. And it's time for me to
|
|||
|
||||
{{< bs/alert info >}}
|
||||
{{< bs/alert-heading "INFO:" >}}
|
||||
I have an open-source project called {{< bs/alert-link "nginx-kickstart" "https://github.com/ditatompel/nginx-kickstart" >}} (boilerplate) to make it easier to install Nginx from the official repository and compile the Nginx VTS module on a FRESH Debian 12 or Ubuntu 22.04 server.
|
||||
I have an open-source project called {{< bs/alert-link "ngx-kickstart" "https://github.com/ditatompel/ngx-kickstart" >}} (boilerplate) to make it easier to install Nginx from the official repository and compile the Nginx VTS module on a FRESH Debian 12 or Ubuntu 22.04 server.
|
||||
{{< /bs/alert >}}
|
||||
|
||||
## Installing Nginx official repo
|
||||
|
@ -121,25 +121,25 @@ http {
|
|||
|
||||
## Preparing the Nginx directory structure
|
||||
|
||||
Create the `sites-available`, `sites-enabled`, `certs`, `snippets` directories inside the `/etc/nginx` directory:
|
||||
Create the `sites-available`, `sites-enabled`, `ssl`, `snippets` directories inside the `/etc/nginx` directory:
|
||||
|
||||
```shell
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,certs,snippets}
|
||||
sudo mkdir -p /etc/nginx/{sites-available,sites-enabled,ssl,snippets}
|
||||
```
|
||||
|
||||
Create a _self-signed_ certificate (only used as an initial configuration which will later be replaced by `certbot`):
|
||||
|
||||
```shell
|
||||
sudo openssl req -x509 -newkey rsa:4096 -days 365 -nodes \
|
||||
-keyout /etc/nginx/certs/privkey.pem \
|
||||
-out /etc/nginx/certs/fullchain.pem \
|
||||
-keyout /etc/nginx/ssl/privkey.pem \
|
||||
-out /etc/nginx/ssl/fullchain.pem \
|
||||
-subj '/CN=example.local/O=My Organization/C=US'
|
||||
```
|
||||
|
||||
Create _DH-param_ by running:
|
||||
|
||||
```shell
|
||||
sudo openssl dhparam -out /etc/nginx/certs/dhparam.pem 2048
|
||||
sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
|
||||
```
|
||||
|
||||
## Cloudflare's IPs trusted proxy
|
||||
|
@ -151,7 +151,7 @@ Create the following _executable shell script_ `/etc/nginx/cloudflare-ips.sh`:
|
|||
```shell
|
||||
#!/usr/bin/env bash
|
||||
# Nginx setup for cloudflare's IPs.
|
||||
# https://github.com/ditatompel/nginx-kickstart/blob/main/etc/nginx/cloudflare-ips.sh
|
||||
# https://github.com/ditatompel/ngx-kickstart/blob/main/etc/nginx/cloudflare-ips.sh
|
||||
# This is modified version of itsjfx's cloudflare-nginx-ips
|
||||
# Ref of original script:
|
||||
# https://github.com/itsjfx/cloudflare-nginx-ips/blob/master/cloudflare-ips.sh
|
||||
|
@ -372,7 +372,7 @@ Configure with the same arguments from the `nginx -V` output above and add `--ad
|
|||
Build, then copy the VTS module you just compiled to `/etc/nginx/modules/`:
|
||||
|
||||
```shell
|
||||
make modules -j$(nproc)
|
||||
make -j$(nproc)
|
||||
sudo cp objs/ngx_http_vhost_traffic_status_module.so /etc/nginx/modules/
|
||||
```
|
||||
|
||||
|
@ -428,12 +428,12 @@ server {
|
|||
|
||||
## Final configuration
|
||||
|
||||
As a final configuration reference, please look at [https://github.com/ditatompel/nginx-kickstart/tree/main/etc/nginx](https://github.com/ditatompel/nginx-kickstart/tree/main/etc/nginx).
|
||||
As a final configuration reference, please look at [https://github.com/ditatompel/ngx-kickstart/tree/main/etc/nginx](https://github.com/ditatompel/ngx-kickstart/tree/main/etc/nginx).
|
||||
|
||||
## Credit and references
|
||||
|
||||
- [https://nginx.org/en/linux_packages.html](https://nginx.org/en/linux_packages.html).
|
||||
- [https://github.com/vozlt/nginx-module-vts](https://github.com/vozlt/nginx-module-vts).
|
||||
- [https://github.com/itsjfx/cloudflare-nginx-ips](https://github.com/itsjfx/cloudflare-nginx-ips).
|
||||
- [https://github.com/ditatompel/nginx-kickstart](https://github.com/ditatompel/nginx-kickstart).
|
||||
- [https://github.com/ditatompel/ngx-kickstart](https://github.com/ditatompel/ngx-kickstart).
|
||||
|
||||
|
|
Loading…
Reference in a new issue