I have a quick question around nginx server. I have setup eight server blpcks(virtual host). One virtual host was setup to redirect, whenever I visit a page that is unavailble on any of my other sitesI am automatically redirected per the setup of the one site for redirection instead of an error page. How would I change this behaviour.
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!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
<blockquote>One virtual host was setup to redirect, whenever I visit a page that is unavailble on any of my other sitesI am automatically redirected per the setup of the one site for redirection instead of an error page. How would I change this behaviour.</blockquote>I’m not sure I understand what you mean. Can you give an example? Also pastebin your nginx config.
You need to create a default virtualhost. If you don’t have one enabled, nginx will use the first virtualhost (Domain A’s) as the default. <br> <br>Create a file called <code>/etc/nginx/sites-enabled/0-default</code> with <a href='https://p.kk7.me/pisusekota.nginx">this</a> as its contents.
Let me explain better. I have domain A redirected to a youtube channel. I now try to visit domain B but I enter some part of the url wrong. Instead of getting an error page I am redirected to the youtube channel…
<br>
<br>Pastebin Domain A config
<br>http://pastebin.com/5S510Vy7
<br>Pastebin Domain B config
<br>http://pastebin.com/RUcKE1vN
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.
Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.
