user266003
user266003

Reputation:

Find out what web server a Rails app is working on on the hosting

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

Answers (2)

Tammy Butow
Tammy Butow

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

sjaime
sjaime

Reputation: 1500

  • Launch your browser.
  • Open the developer tools, go to the Network tab
  • Navigate to the web app.
  • On the left panel, click on any of the loaded resources.
  • Select the Headers 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)

An example with Chrome

Upvotes: 4

Related Questions