nginx - HTTPS request URL by Captive-Portal in RPi3 Wireless Access Point -


i running media art project using rasp pi 3 wireless access point captive portal. redirect packets using iptables sinatra can request url sent device.

the problem if user's request https website such facebook, google or others, packet can't read.

so i've tried bulid reverse-porxy , change iptables' redirect target nginx server decoding request url under https following link: http://www.htpcguides.com/enforce-ssl-secure-nginx-reverse-proxy-linux/

this how change iptables

sudo iptables -t nat -a prerouting -p tcp --dport 443 -j dnat --to-destination 127.0.0.1:443 sudo iptables -t nat -a prerouting -p tcp --dport 53 -j dnat --to-destination 127.0.0.1:53 sudo iptables -t nat -a prerouting -p tcp --dport 80 -j dnat --to-destination 192.168.0.1:4567 

and how configue nginx: (port 4567 sinatra listened)

server {         listen 80;         server_name 192.168.0.1 localhost;         return 301 http://192.168.0.1:4567;          access_log /var/log/nginx/backintime-access80.log;         error_log /var/log/nginx/backintime-error80.log; }  server {         listen 443 ssl;         server_name 192.168.0.1 localhost;         root /home/backintime/new-back-in-time/public/;         ssl_certificate /etc/ssl/backintime.studio.ssl/backintime.studio.crt;         ssl_certificate_key /etc/ssl/backintime.studio.ssl/backintime.studio.key;          location / {                 proxy_pass http://192.168.0.1:4567;                 proxy_set_header host $host;                 proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for;                 proxy_set_header x-real-ip $remote_addr;                 proxy_set_header client_ip $remote_addr;                 proxy_set_header remote_ip $remote_addr;         }          access_log /var/log/nginx/backintime-access.log;         error_log /var/log/nginx/backintime-error.log; } 

and stuck here. think nginx server can't recognize packets redirect iptables. second proxy_pass seems not sending thing sinatra.

is there other ways solve problem ? or part of work wrong?

thanks.


Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -