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!
<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.
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.