1, If the port is not 80 Ports must be added when they are matched

if (req.http.host ~ "(?i)^var.test.aa:6081$") {
set req.http.host = "var.test.aa";  # effect X-Cache:MISS from var.test.aa If you don't have it below X-Cache:MISS from nish.test.bb:6081

set req.backend_hint = apache.backend();

} elsif (req.http.host ~ "(?i)^nish.test.bb:6081$") {
set req.backend_hint = nginx.backend();
}

2.varnish Agent local nginx yes , It's like no matter how it's configured , Specified domain name and port will be the default proxy to 80 The first port nginx To configure

3.

sub vcl_init {
#new apache = directors.random();  # Both of the following work
new apache = directors.round_robin();
apache.add_backend(web1);
#new nginx = directors.random();
new nginx = directors.round_robin();
nginx.add_backend(web2);
}

varnish 4.0.3 More articles about the small problems of domain name access

  1. [ Personal test ]ASP.NET Core 2.0 How to publish / Deploy to Ubuntu Linux Server and configure Nginx Reverse proxy realizes domain name access

    Preface ASP.NET Core 2.0 How to publish to Ubuntu The server ? And how to configure and use it on the server ASP.NET Core The website is bound to the specified domain name , So that Internet users can access it ? step The first 1 Step : preparation a Liun ...

  2. [ Personal test ] Seven steps to learn ASP.NET Core 2.0 How to publish / Deploy to Ubuntu Linux Server and configure Nginx Reverse proxy realizes domain name access

    Preface ASP.NET Core 2.0 How to publish to Ubuntu The server ? And how to configure and use it on the server ASP.NET Core The website is bound to the specified domain name , So that Internet users can access it ? step The first 1 Step : preparation a Liun ...

  3. php Configure the host virtual directory ( Use a virtual domain name to access 127.0.0.1) It doesn't work at all ?????

    php Configure the host virtual directory ( Use a virtual domain name to access 127.0.0.1)steps:1> Open Directory   D:\xwamp\bin\apache\apache2.4.9\conf     Modify file httpd ...

  4. Varnish 4.0

    Varnish 4.0 actual combat   brief introduction Varnish Is a high-performance and open source reverse proxy server and HTTP Accelerator , It uses a new software architecture , With the current hardware system , With the traditional squid comparison ,varn ...

  5. git Study ------> stay CenterOS Installation on system GitLab And custom domain access GitLab Manage Pages

    The company I'm working for has been using SVN As version management , Now I'm going to try from SVN Migrate to Git. Arrange me to predict and set up the relevant environment and try to use it myself Git. Today I'm trying to Center OS Installation on system GitLab, Now record a ...

  6. be based on .Net core3.0 Development of the bucket diagram small program back end + Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo Doo

    Why write such a small program ? As a native of the Internet . 90 I am a post programmer , From high school on QQ Little expression . After the panda head , mushroom-shaped umbrella . It can be said that facial expression bag accompanies me from school to society , From adolescence to middle age .. And because doutu is powerful , And found a woman ...

  7. adopt http、https Domain name access static web page 、nginx Configure load balancing (nginx To configure )

    In many scenarios, you need to be able to access static web pages through a browser , I don't want to put the server ip The address is directly exposed , adopt nginx Can solve this problem . Realization http Domain name access static web page 1. Domain name resolution configuration ( This article takes Alibaba cloud as an example , Other platforms , Operation step class ...

  8. wamp apache Virtual machine configuration for Multi domain access Of Trilogy

    wamp apache  Virtual machine configuration for   Multi domain access   Of   Trilogy wamp:       1:C:\WINDOWS\system32\drivers\etc->hosts         Join your own ...

  9. NGINX take PHP Parameterized URL Address redirection secondary or multi-level domain name access

    Today's project has a mobile site to use *.m.domain.com Third level domain name access . For example, the website of mobile site is m.domain.com, The actual access address of the member under the mobile phone is index.php?username=$user ...

Random recommendation

  1. control Linux Next mono Service start stop

    When Window Deployment of services under Linux When , We usually use Mono.service To start and stop . There are many parameters , Not very easy to use . So there's this Shell Script . usage :moa s1 start # start-up          ...

  2. hdu1533 Problem solving report

    The question : Here's one N*M The grid of ..... In the figure m On behalf of ,H It's for the house ... And the number of people is equal to the number of houses .. that . Everyone can walk vertically or horizontally , And it costs 1S element ... So in order to get everyone into the house , Find the minimum cost ...

  3. mpvue Preparation

    One . Configuration environment : 1. download node.js, Go to the official website to download the corresponding version .http://nodejs.cn 2. Installation is the next step, the next step , Check if the installation is successful , open cmd. Input  node -v Version number will appear . 3. PUSH ...

  4. docker 3 docker install

    centos docker install docker Support the following centos edition : centos 7 (64-bit) centos 6.5 (64-bit) Or later Prerequisite at present ,centos In distribution only ...

  5. [asp.net core]The requested page cannot be accessed because the related configuration data for the page is invalid.

    bug HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the rela ...

  6. vue-cli The scaffold

    cnpm i vue-cli -g   //npm Installation error , Unknown cause , Maybe it's because I changed things , however cnpm Can install The command line goes to the new vue Directory execution of C:\Users\76912\Videos\v ...

  7. C# Console progress bar (Programming Progress bar in C# Consle application)

    The following code is from Stack Overflow, If you think it will be used in the future, just collect it , I'm a hard-working porter , Eeee eeee - 1.showing percentage in .net console application( stay . ...

  8. CentOS6.x Install upgrade Python2.7.x Python3.4.x

    CentOS6.x Install upgrade Python2.7.x Python3.4.x 2015-06-07• CentOS.Linux • Comment off CentOS release 6.6 (Final) Install the lift ...

  9. Ready to see ros Related to the source code

    Process of communication :lcm Navigation :navigation 3D Visualization tools :rviz Mobile Robot Programming Toolkit:mrpt other : Human muscles :simbody openslam ...

  10. js After the realization of domain name judgment, jump to the designated URL

    js After the realization of domain name judgment, jump to the designated URL , It is also suitable for multiple websites in the same virtual space : <script>       try           {               if(self.locatio ...