So i was hosting a server in my home by using nextcloud.For port forwarding i used ngrok and whenever i login to my nextcloud account it gives me "ngrok-browser-warning-page".To overcome this i use nginx for reverse proxy method: Configure Nginx for Reverse Proxy:
sudo nano /etc/nginx/sites-available/ngrok
Inside this configuration file,
server{ server_name localhost ngrok.localhost.direct; listen 80; listen 443 ssl; location / { //regular forwarding headers proxy_set_header X—Forwarded—For X—Forwarded-For $proxy_protocol_addr; proxy_set_header X—Forwarded—Proto $scheme; proxy_set_header Host thrush—proper—kingfish.ngrok—free.app;
//this line does the actual trick
proxy_set_header ngrok—skip—browser—warning 1; //forward! proxy_pass https://thrush—proper—kingfish.ngrok—free.app/ ;
Enable the Nginx Site Configuration*
> sudo ln -s /etc/nginx/sites-available/ngrok /etc/nginx/sites-enabled/
Test the Configuration*
> sudo nginx -t
it gives me the error
so the config file written over here is correct or not idk ?? help me to fix thiss pleasse
already mentioned aboveenter image description here