By SAIMRAZA786
i configure ngnix proxy with ip and use it ip . its working perfect but when i try to use in name server then its not working after lot of searching i am finding something but same issue
Problem is i want to use like it
ns1.domainname.com >> ngnix proxy Ip
ns2.domainname.com >> ngin proxy ip
here is my configure which i use to set ip… Please give me configure which i use and set name servers
## Basic reverse proxy server ##
## HTTP backend for www.example.com ##
upstream httpweb {
server 5.135.175.213:80; # cPanel server
}
## Start www.example.com ##
server {
listen 185.144.31.177:80;
server_name www.example.com;
access_log /var/log/nginx/log/www.example.access.log main;
error_log /var/log/nginx/log/www.example.error.log;
root /usr/share/nginx/html;
index index.html index.htm;
## send request back to apache1 ##
location / {
proxy_pass http://httpweb;
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_buffering off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi @SAIMRAZA786
This makes no sense:
ns1.domainname.com >> ngnix proxy Ip
ns2.domainname.com >> ngin proxy ip
What are you trying to do? Please explain from start to end, without any configurations, just in words.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.