Skip to content

Commit f0abcd6

Browse files
committed
docs(pdp): address review feedback on Enable HTTPS guide
1 parent 449c990 commit f0abcd6

1 file changed

Lines changed: 13 additions & 15 deletions

File tree

storage-providers/pdp/nginx-reverse-proxy.md

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ description: >-
66

77
# Enable HTTPS for PDP
88

9-
This guide documents a working nginx setup on **Ubuntu 22.04** that provides HTTPS access to Filecoin PDP (Curio) services using Let's Encrypt certificates. The configuration is based on a production system serving `calib.ezpdpz.net` and `calib2.ezpdpz.net`.
9+
This guide documents a working nginx setup on **Ubuntu 22.04** that provides HTTPS access to Filecoin PDP (Curio) services using Let's Encrypt certificates. The examples use the placeholder domains `pdp.example.com` and `pdp2.example.com` — replace them with your own domains throughout.
1010

1111
{% hint style="warning" %}
1212
**This setup is specific to one example environment.** You must adjust hostnames, internal IP addresses, and paths to match your own system and network configuration.
1313
{% endhint %}
1414

1515
{% hint style="info" %}
16-
**Strong recommendation:** Before making any configuration changes, install an AI coding assistant such as Claude Code or OpenAI Codex. These tools can help you verify syntax, debug nginx and Certbot issues, and safely adapt the configuration to your own setup.
16+
**Before making any configuration changes,** back up your existing nginx configuration and validate every change with `sudo nginx -t` before reloading. This catches syntax errors before they take down the service.
1717
{% endhint %}
1818

1919
***
@@ -76,20 +76,20 @@ certbot --version
7676

7777
## 3️⃣ Configure the Virtual Host
7878

79-
Create a configuration file for your domain. Replace `calib.ezpdpz.net` with your domain and `192.168.1.160` with your Curio service IP.
79+
Create a configuration file for your domain. Replace `pdp.example.com` with your domain and `192.168.1.160` with your Curio service IP.
8080

8181
Create the file:
8282

8383
```sh
84-
sudo nano /etc/nginx/sites-available/calib.ezpdpz.net
84+
sudo nano /etc/nginx/sites-available/pdp.example.com
8585
```
8686

8787
Add this initial configuration (before SSL setup):
8888

8989
```nginx
9090
server {
9191
listen 80;
92-
server_name calib.ezpdpz.net;
92+
server_name pdp.example.com;
9393
9494
location / {
9595
return 200 "Server is ready for certbot";
@@ -100,7 +100,7 @@ server {
100100
Enable the site:
101101

102102
```sh
103-
sudo ln -s /etc/nginx/sites-available/calib.ezpdpz.net /etc/nginx/sites-enabled/
103+
sudo ln -s /etc/nginx/sites-available/pdp.example.com /etc/nginx/sites-enabled/
104104
```
105105

106106
Test the configuration and reload nginx:
@@ -117,7 +117,7 @@ sudo systemctl reload nginx
117117
Run Certbot with the nginx plugin:
118118

119119
```sh
120-
sudo certbot --nginx -d calib.ezpdpz.net
120+
sudo certbot --nginx -d pdp.example.com
121121
```
122122

123123
Follow the prompts:
@@ -139,7 +139,7 @@ Certbot will automatically:
139139
After Certbot completes, edit your site configuration:
140140

141141
```sh
142-
sudo nano /etc/nginx/sites-available/calib.ezpdpz.net
142+
sudo nano /etc/nginx/sites-available/pdp.example.com
143143
```
144144

145145
Replace the contents with the following. Substitute `YOUR_DOMAIN` and `YOUR_CURIO_IP` with your own values.
@@ -223,7 +223,7 @@ sudo systemctl reload nginx
223223

224224
**Proxy settings**
225225

226-
* `proxy_pass http://YOUR_CURIO_IP:443`: forward to the Curio service (note: HTTP, not HTTPS — Curio handles TLS internally via DelegateTLS).
226+
* `proxy_pass http://YOUR_CURIO_IP:443`: forward to the Curio service over plain HTTP. With `DelegateTLS = true`, Curio serves HTTP (even on port 443) and delegates TLS termination to nginx, so nginx is the only component encrypting traffic. Keep this link on a trusted LAN.
227227
* `proxy_set_header` directives: preserve client information (original host, real IP, forwarded chain, and scheme).
228228

229229
***
@@ -249,15 +249,15 @@ Restart Curio after making configuration changes.
249249
Test the HTTPS connection:
250250

251251
```sh
252-
curl -I https://calib.ezpdpz.net
252+
curl -I https://YOUR_DOMAIN
253253
```
254254

255255
You should see a response from your Curio service through nginx.
256256

257257
Check the SSL certificate:
258258

259259
```sh
260-
openssl s_client -connect calib.ezpdpz.net:443 -servername calib.ezpdpz.net
260+
openssl s_client -connect YOUR_DOMAIN:443 -servername YOUR_DOMAIN
261261
```
262262

263263
***
@@ -267,13 +267,13 @@ openssl s_client -connect calib.ezpdpz.net:443 -servername calib.ezpdpz.net
267267
View nginx access logs:
268268

269269
```sh
270-
sudo tail -f /var/log/nginx/calib.ezpdpz.net.access.log
270+
sudo tail -f /var/log/nginx/YOUR_DOMAIN.access.log
271271
```
272272

273273
View nginx error logs:
274274

275275
```sh
276-
sudo tail -f /var/log/nginx/calib.ezpdpz.net.error.log
276+
sudo tail -f /var/log/nginx/YOUR_DOMAIN.error.log
277277
```
278278

279279
Check nginx status:
@@ -326,5 +326,3 @@ This will show specific syntax errors in your configuration.
326326
* Multiple domains supported (one per Curio instance).
327327

328328
The key advantage is that nginx handles all SSL complexity while Curio services focus on PDP operations without needing to manage certificates.
329-
</content>
330-
</invoke>

0 commit comments

Comments
 (0)