Linked Questions
11 questions linked to/from What is the difference between Nginx variables $host, $http_host, and $server_name?
1 vote
0 answers
157 views
$server_name not matching domain when multiple subdomains listed in nginx [duplicate]
I have the following server block defined: server { server_name jsonip.com www.jsonip.com ipv4.jsonip.com ipv6.jsonip.com; add_header x-domain-name "$server_name $http_host $host" always; } I'm ...
4 votes
1 answer
25k views
How to obtain hostname of request nginx
Hello I am trying to redirect all my requests to use https. I have created a server block that listens on port 80 (http) and I want to redirect the user to use https:// however I am unsure how to ...
0 votes
1 answer
14k views
NGINX rewrite to new protocol and port
I am trying to rewrite requests to http://www.example.com:88 to https://www.example.com:4430 At the moment, I am stuck with nonstandard ports. Here is my configuration: upstream pool { server 127....
4 votes
1 answer
4k views
What is the $server_name variable set to?
I have a server block to redirect all http requests to https as follows: server { listen 0.0.0.0:80; listen [::]:80; server_name a.com b.com c.com; return 301 https://$server_name$...
1 vote
1 answer
3k views
Nginx HTTPS configuration redirects to faulty URL
I have Nginx working with gunicorn as an upstream server. I am trying to configure the site to use HTTPS and force all HTTP requests to use SSL. Here is my nginx configuration in /etc/nginx/conf.d/...
2 votes
1 answer
2k views
nginx reverse server upstream name syntax
I very appreciated if someone can give me some help. I just tried to learn the nginx reverse proxy but have experienced some problem about upstream name syntax. Please refer to this photo Photo: nginx ...
0 votes
1 answer
2k views
nginx-1.15.9 Variable support in "ssl_certificate" and "ssl_certificate_key" directives
So nginx-1.15.9 was released very recently with the following change: Feature: variables support in the "ssl_certificate" and "ssl_certificate_key" directives. I setup an instance with ...
1 vote
2 answers
2k views
How do I 301 redirect 80 -> 443 in a development environment with no domain?
I'm trying to setup an nginx config that behaves similar to our production servers in which requests to port 80 get redirected to 443, it works fine when working straight off the dev machine you're ...
-1 votes
1 answer
395 views
What destination does underline mean?
I am using jwilder/nginx-proxy on a server, reachable on the public internet. But actually the only counting part should be that it is nginx. On a regular basis, I check all the logs of my various ...
0 votes
1 answer
327 views
Auto Virtual Host - Single Nginx config
I am trying to create a single Nginx config for multiple hosts based on a directory. I followed a guide which seems to work well with standard HTTP setup but when I add the HTTPS 301 redirect, I can ...
0 votes
2 answers
91 views
Manipulate .conf file to rewrite https properly
I'm having a nginx server and a domain, example.com. Each customer has his own subdomain, like wsb.example.com etc. Their content changes via PHP, but all subdomains get redirected to the same folder ...