Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1456 closed defect (invalid)

.tech domain location problem

Reported by: horuszp92@… Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.12.x
Keywords: Cc:
uname -a: Linux CentOS-73-64-minimal 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.12.2

Description

Hi I have a problem with locations configure on .tech domain zone.
I have domain hstudio.tech andI tried make location "/category" in configuration files to proxy_pass on my golang instance, but each time i received 404 code.
I tried redirects, also simple http code return, but every time I opened https://hstudio.tech/category/ I received 404 error.
Then I fully copied my config file and configured domain to .com instead .tech (hstudio.com instead hstudio.tech), I don't own this domain so just tried via /etc/hosts file, and it worked. I changed only server_name parameter and nothing else.

Here is config file with .tech name

server {
  listen 80;
  server_name hstudio.tech www.hstudio.tech;
  #return 301 https://hstudio.tech$request_uri;
}
server {
  listen 443 ssl;
  server_name hstudio.tech www.hstudio.tech;
  root /var/www/html/hstudio;
  index index.php index.html index.htm;
  error_log /var/log/nginx/hstudio.log error;
  access_log /var/log/nginx/hstudaccess.log;
  location /category {
    proxy_pass	http://localhost:880;
}
  location = /favicon.ico {
    log_not_found off;
    access_log off;
  }
  ssl_certificate /etc/letsencrypt/live/hstudio.tech/cert.pem;
  ssl_certificate_key /etc/letsencrypt/live/hstudio.tech/privkey.pem;
  location = /robots.txt {
    allow all;
    log_not_found off;
    access_log off;
  }
}

Change History (3)

comment:1 by horuszp92@…, 6 years ago

Added wrong nginx -v
here is actual:
nginx version: nginx/1.12.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-16) (GCC)
built with OpenSSL 1.0.2k-fips 26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-compat --with-file-aio --with-threads --with-http_addition_module --with-http_auth_request_module --with-http_dav_module --with-http_flv_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_mp4_module --with-http_random_index_module --with-http_realip_module --with-http_secure_link_module --with-http_slice_module --with-http_ssl_module --with-http_stub_status_module --with-http_sub_module --with-http_v2_module --with-mail --with-mail_ssl_module --with-stream --with-stream_realip_module --with-stream_ssl_module --with-stream_ssl_preread_module --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -fPIC' --with-ld-opt='-Wl,-z,relro -Wl,-z,now -pie'

comment:2 by Maxim Dounin, 6 years ago

Resolution: invalid
Status: newclosed

This doesn't looks like a problem in nginx - rather, a misconfiguration elsewhere. In particular, it looks like the "hstudio.tech" domain points to Cloudflare. You may want to check your Cloudflare configuration to understand what's going on here, or make sure to point the domain directly to your server instead.

If you have further questions on nginx configuration, please use the support options available.

comment:3 by horuszp92@…, 6 years ago

My bad, It is really cloudflare, domain was set to Flexible SSL and SSL was served by cloudflare instead server. Thank you for help!

Note: See TracTickets for help on using tickets.