Tag: nginx
-
centos web panel – vhost templates for proxying websocket traffic
http://wiki.centos-webpanel.com/webservers-vhost-templates Templates location: /usr/local/cwpsrv/htdocs/resources/conf/web_servers/– Folder main contains main configuration for WebServers– Folder vhosts contains vhosts configuration for domains (this is what you need) How to create a template fileThe easiest way to do that is to simply copy an existing file and then edit a new file you have created.Note that you need to have…
-
Basic Authentication in nginx for any domain, server or location block
Update the domain.conf file like /etc/nginx/conf.d/vhosts/myrestricteddomain.com.ssl.conf Ideally, use it in server config Save and restart nginx
-
Basic Authentication with Nginx with proxy port (react/node app etc)
Reference: https://docs.nginx.com/nginx/admin-guide/security-controls/configuring-http-basic-authentication/ Requirements: apache2-utils or httpd-tools Use htpasswd utility and create a .htpasswd file, see reference After that, just add lines in nginx conf Restart nginx now or test first using “nginx -t”
-
proxying websockets via nginx and https
-
How to whitelist IPs in NGINX configuration?
Add this code in your .conf file