iam_production_deployment_guide
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| iam_production_deployment_guide [2026/02/26 10:20] – [Proxy through NGINX] pradnya | iam_production_deployment_guide [2026/02/26 12:47] (current) – [cPanel's userdata include] pradnya | ||
|---|---|---|---|
| Line 331: | Line 331: | ||
| </ | </ | ||
| - | ===== Proxy through NGINX ===== | + | ===== Proxy through NGINX - Droplet FIX ===== |
| To resolve on browser error "We are sorry… HTTPS required" | To resolve on browser error "We are sorry… HTTPS required" | ||
| Line 444: | Line 444: | ||
| Allow Nginx to connect to local ports | Allow Nginx to connect to local ports | ||
| < | < | ||
| + | |||
| | | ||
| Line 449: | Line 450: | ||
| setenforce 1 | setenforce 1 | ||
| - | |||
| </ | </ | ||
| Stop docker and NginX and start again. | Stop docker and NginX and start again. | ||
| + | |||
| + | ===== cPanel' | ||
| + | |||
| + | **Step 1: Create the userdata directories** | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | mkdir -p / | ||
| + | mkdir -p / | ||
| + | |||
| + | </ | ||
| + | |||
| + | **Step 2: Create HTTP proxy config** | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | nano / | ||
| + | |||
| + | </ | ||
| + | |||
| + | Add: | ||
| + | |||
| + | < | ||
| + | RewriteEngine On RewriteRule ^(.*)$ https:// | ||
| + | |||
| + | **Step 3: Create HTTPS proxy config** | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | |||
| + | </ | ||
| + | |||
| + | Add: | ||
| + | |||
| + | < | ||
| + | ProxyPreserveHost On\ | ||
| + | ProxyPass / http:// | ||
| + | ProxyPassReverse / http:// | ||
| + | RequestHeader set X-Forwarded-Proto " | ||
| + | RequestHeader set X-Forwarded-Port " | ||
| + | |||
| + | </ | ||
| + | |||
| + | **Step 4: Rebuild Apache config and restart** | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | / | ||
| + | httpd -t | ||
| + | systemctl restart httpd | ||
| + | |||
| + | </ | ||
| + | |||
| + | Then test: | ||
| + | |||
| + | bash | ||
| + | |||
| + | < | ||
| + | curl -I https:// | ||
| + | |||
| + | </ | ||
| + | |||
| + | Expected result: | ||
| + | |||
| + | < | ||
| + | curl -I [[https:// | ||
| + | |||
| + | HTTP/1.1 302 Found Date: Thu, 26 Feb 2026 11:22:25 GMT | ||
| + | |||
| + | Server: Apache | ||
| + | |||
| + | Location: [[https:// | ||
| + | |||
| + | Referrer-Policy: | ||
| + | |||
| + | Strict-Transport-Security: | ||
| + | |||
| + | X-Content-Type-Options: | ||
| + | |||
| + | X-XSS-Protection: | ||
| + | |||
| + | mode=block | ||
| + | |||
| + | </ | ||
| + | |||
| + | Check for **Location: https:// | ||
| + | |||
| + | This is poining to correct directory and not apache direcoty with cgi folder. | ||
iam_production_deployment_guide.1772101248.txt.gz · Last modified: by pradnya
