Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

vesta - nginx 301 redirect - how to debug / troubleshoot

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
1 post • Page 1 of 1
ilikejazz
Posts: 1
Joined: Tue Jul 25, 2017 11:11 am

vesta - nginx 301 redirect - how to debug / troubleshoot
  • Quote

Post by ilikejazz » Tue Jul 25, 2017 11:27 am

Hi,

I'm trying to set up vesta for the first time on my new vps, it's mostly working but it seems that nginx forces a 301 redirect back to the same location which then shows the main ip address of the host. Regardless of how i navigate to this page via domain, alias, or ip it will still redirect back to itself with a 301 and show the real ip of the host . This is causing some problems when i try and add cloudflare as it then exposes my main host ip.

How can i diagnose this? I've looked in the nginx.conf and the apache config but there's nothing too specific.

Could it be something to do with the trailing slash i see added in curl? Any help would be appreciated.

sample curl below :

Code: Select all

 curl http://DOMAIN.com --resolve DOMAIN.com:80:IPADDRESSHERE -svo /dev/null
* Added DOMAIN.com:80:IPADDRESSHERE to DNS cache
* Rebuilt URL to:http://DOMAIN.com/
* Hostname DOMAIN.com was found in DNS cache
*   Trying IPADDRESSHERE...
* Connected to  DOMAIN.com (IPADDRESSHERE) port 80 (#0)
> GET / HTTP/1.1
> Host: DOMAIN.com
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 301 Moved Permanently
< Server: nginx
< Date: Tue, 25 Jul 2017 11:05:47 GMT
< Content-Type: text/html; charset=UTF-8
< Content-Length: 0
< Connection: keep-alive
< Keep-Alive: timeout=60
< Location: http://IPADDRESS/
<
* Connection #0 to host DOMAIN.com left intact
Top


Post Reply
  • Print view
1 post • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password