Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9145623
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T10:33:37+00:00 2026-06-17T10:33:37+00:00

I saw example configurations of nginx , most of them use example.com as a

  • 0

I saw example configurations of nginx, most of them use example.com as a server_name and uwsgi_pass similar to unix:/var/www/run/blog.sock; or in combination with ip/port address. but what should I use in case of amazon ec2 instance, since it has long public name, ip is private and if I restart my instance it gets different public name and ip. I need shutdown instances sometime. I want to configure it for using uwsgi+django, but I am totally beginner in web area and servers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T10:33:39+00:00Added an answer on June 17, 2026 at 10:33 am

    The server_name directive is useful in cases where you want to host different sites on the same server, and handling them differently depending on the “Host” header field (ex: mysite1.com => a PHP website, mysite2.com => a django website,…)
    It’s actually a virtual server (see also [the server directive])1.

    From this article :

    […] nginx tests only the request’s header field
    “Host” [against the server_name directive] to determine which server the request should be routed to. If
    its value does not match any server name, or the request does not
    contain this header field at all, then nginx will route the request to
    the default server for this port.

    If I understood, you don’t want that. So you can use the underscore character (in the Miscellaneous Names section).

    When I don’t need to handle specific domains, I generally use “localhost”. To be honest I couldn’t find any explanation on what it does. I just found examples with this value, and it seems to work exactly as the underscore character.

    So I’d go with

    server_name _;
    

    or

    server_name localhost;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Once, I saw an example like this: var a, x, y; var r =
I saw this example in php manual page http://www.php.net/manual/en/session.examples.php The example will create a
Saw this example on the jQuery examples page for Ajax: var xmlDocument = [create
I saw this example on appsmuck.com for seamless video looping, it works fine on
I saw this example from udacity.com : def say_hi(): return 'hi!' i = 789
I saw this example somewhere: rs = connection.prepareStatement(select * from table).executeQuery(); Could I use
I'm looking at the Plugin Authoring article at http://docs.jquery.com/Plugins/Authoring and saw this example in
I thought i saw an example recently that would allow you to use jquery
I saw an example today of a method overriding a method in a base
i saw a example for login form same blow code class Form_Login extends Zend_Form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.