Questions tagged [server-name]

91 questions
173
votes
8 answers

nginx server_name wildcard or catch-all

I have an instance of nginx running which serves several websites. The first is a status message on the server's IP address. The second is an admin console on admin.domain.com. These work great. Now I'd like all other domain requests to go to a…
Tak
  • 11,428
  • 5
  • 29
  • 48
37
votes
6 answers

Why does SQL Server @@SERVERNAME return my old machine name?

I just stumbled across an issue in my SQL Server 2008 R2 - When I call @@SERVERNAME, it's returning my OLD computer's machine name, rather than the current one. Why is this? And how can I fix it? SQL Server somehow is remembering the old machine…
Jerry Dodge
  • 26,858
  • 31
  • 155
  • 327
15
votes
3 answers

What's the difference between ServerVariables["HTTP_HOST"] and ServerVariables["SERVER_NAME"]?

I'm confused about the difference between these two server variables. Checking the IIS documentation, it states :- HTTP_HOST Returns the name of the Web server. This may or may not be the same as SERVER_NAME depending on type of name resolution you…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
11
votes
2 answers

Apache VirtualHost, multiple ServerName in one line

I am using the following tag ServerName blog.mydomain.com ServerAlias blog to create a virtual host. I've put the ServerName as my subdomain which is blog. However, i'm trying to figure out a way to add www.blog.…
John
  • 6,417
  • 9
  • 27
  • 32
11
votes
2 answers

Different Ways To Get The Server Name In ASP.NET

I want to log my server name in ASP.NET Application, I use multi-servers and load balancing so I need to log the server name. But what is the difference between these ways to get the server name? and which one is true or better to log? any idea?…
Saeid Alizade
  • 853
  • 3
  • 9
  • 18
8
votes
1 answer

Apache Virtual Host is not working right

Somehow my Virtual host files are not working straight I can't tell why - I bet it's just a mailfunction in my good-morning brain :p Right now I got TWO sites enabled via a symbolic link to sites available in /etc/apache2/ directory like : 0 Nov 21…
Kris
  • 567
  • 3
  • 11
  • 25
8
votes
3 answers

Can $_SERVER['SERVER_NAME'] be forged/faked?

Can the PHP variable $_SERVER['SERVER_NAME'] be forged or faked? I was planning on using that as a security measure for form posting. I would check to make sure that variable is my site name (www.example.com). I know HTTP_REFERRER can be faked, but…
Matthew Ebert
  • 125
  • 1
  • 7
8
votes
2 answers

ServerAlias doesn't work

I have problem with ServerAlias directive. Configuration looks like this: ServerName d.geosurf.ru ServerAlias www.d.geosurf.ru divo32pro.ru www.divo32pro.ru But! Everytime when I try to go to divo32pro.ru, for example, i get d.geosurf.ru…
Anton Abramov
  • 2,251
  • 6
  • 24
  • 27
5
votes
1 answer

Nginx Setup for Multiple domains with individual ssl certificates to same upstream

so I have multiple domains with multiple let's encrypt ssl certificates (one per domain) which all point to the same app (upstream). Currently I am using the code below. However it is quite a lot of code, especially if I have to replicated it for…
Lukas Oppermann
  • 2,918
  • 6
  • 47
  • 62
5
votes
1 answer

OpenSSL::SSL::SSLContext SNI servername_cb Not Working

As referenced in OpenSSL::X509::Certificate Showing Certificate for Wrong Domain, I need to use TLSv1 or above and Server Name Indication extension. Even with ssl_version and servername_cb set via the SSLContext, I'm still getting the wrong…
Seth Reeser
  • 195
  • 2
  • 2
  • 13
5
votes
1 answer

Server name not displayed in visual studio server explorer

Any ideea why my local sever is not displaed in the drop down list where u select the server name? Thx!
TBogdan
  • 737
  • 7
  • 17
  • 34
4
votes
0 answers

How many server blocks can I add in Nginx Conf?

I found this question How many server blocks can I add in Nginx Conf But I don't think adjust server_names_hash_bucket_size and server_names_hash_max_size is the answer. Because the explanation from Nginx is this: If a large number of server names…
Bruce Mu
  • 893
  • 11
  • 22
4
votes
2 answers

Declare the server name as a variable in MS Sql Server 2016

I have a big script file and I need to use it on another server. I need to edit the name of the server one time at the beggining using Declare so I can be able to use the same script on multiple servers only by changing the value of the…
Samy Sammour
  • 2,298
  • 2
  • 31
  • 66
4
votes
3 answers

Changing Tomcat server name in response header, is that possible?

When a http request from a browser is made, typically the server container will send along in the header what server it was. For tomcat it sends Server:Apache-Coyote/1.1 I know I can overwrite this header, for each request, but there is also…
mjs
  • 21,431
  • 31
  • 118
  • 200
4
votes
1 answer

Incorrect string length of $_SERVER['SERVER_NAME']

So I am trying to check if the Apache server name contains a certain string, and noticed very strange behavior (for instance, no matches in an if statement, even when the strings appeared to match exactly). Using var_dump() I looked at my variable…
nickford
  • 782
  • 6
  • 8
1
2 3 4 5 6 7