server {
listen 443 ssl;
server_name yourdomain.com;
ssl_certificate /path/to/cert.crt;
ssl_certificate_key /path/to/key.key;
location / {
proxy_pass http://localhost:8787;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
<VirtualHost 127.0.0.1:443>
ServerName yourdomain.com
SSLEngine on
SSLCertificateFile "/path/to/cert.crt";
SSLCertificateKeyFile "/path/to/key.key"
ProxyRequests On
<Proxy>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:8787/
Header set Access-Control-Allow-Origin "*"
</VirtualHost>
Restart the server and start wrangler on the port that you want
wrangler dev --port 8787