Reputation:
I'm given access to a Rails application which is hosted on a Linux machine. I need to setup a redirection from www
to the root domain and, although it can be done via the application using before_filter
or route.rb
, it's better to do it via the web server. But I don't know what web server it's working on. It may or may not be nginx - I don't know. This is what I need to find out. How can I do that?
Upvotes: 3
Views: 891
Reputation: 61
You can run the following in command line:
curl -I www.yoururl.com
or
curl -I youripaddress
When I run this for my server I see:
HTTP/1.1 200 OK
Server: nginx
Date: Sat, 27 Dec 2014 02:20:01 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Status: 200 OK
This is a super quick way to find out! :) Good luck!!
Upvotes: 4
Reputation: 1500
Network
tabHeaders
tab and find the Server
header within the Response headers
section.This screenshot was made with Chrome (it's slightly different with Firefox or IE)
Upvotes: 4