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 7721651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T03:58:38+00:00 2026-06-01T03:58:38+00:00

I am using nginx + unicorn in linode. This is my nginx.conf upstream unicorn

  • 0

I am using nginx + unicorn in linode.

This is my nginx.conf

upstream unicorn {
  server unix:/tmp/unicorn.mydomain.sock fail_timeout=0;
}
server {
  listen 80 default;
  server_name  mydomain.com;
   keepalive_timeout 5;

  root /home/hyperrjas/mydomain.com/current/public;

  location / {
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    # this is required for HTTPS:
    # proxy_set_header X-Forwarded-Proto https;
    proxy_set_header Host $http_host;
    proxy_redirect off;
    proxy_pass http://unicorn;
  }

      location ~ ^/(assets)/  {
                                root /home/hyperrjas/mydomain.com/current/public;
                                gzip_static on; # to serve pre-gzipped version
                                expires max;
                                add_header  Cache-Control public;
                               }

  error_page 500 502 503 504 /500.html;
}

I want to add 4 subdomains:

imagescdn1.mydomain.com 
imagescdn2.mydomain.com  
imagescdn3.mydomain.com  
imagescdn4.mydomain.com

How can I do it?

  • 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-01T03:58:39+00:00Added an answer on June 1, 2026 at 3:58 am

    You should use regex for server_name directive, i.e. something like this:

    server {
        server_name   mydomain.com  ~^imagescdn\d+\.mydomain\.com$;
    }
    

    Refer to original documentation here and here for more information.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i started using nginx upload module (which creates upload files like /tmp/000121545) but i
I'm using cgilua on a nginx server and my problem is when I put
I'm using upstart v1.4 to start my application server, it's called unicorn . The
I'm using nginx with this script as FastCGI wrapper, that I start with: spawn-fcgi
I'm using Nginx as webserver, with a reverse proxy to a gunicorn django server.
I'm using Nginx to reverse proxy my Unicorn process for a Rails app that
This is my first time using nginx and I'm having some problems configuring an
How can I redirect mydomain.example and any subdomain *.mydomain.example to www.adifferentdomain.example using Nginx?
I am using nginx as a frontend to an apache server. The config file
We're using Nginx on the server reserved for development (testing) and we want to

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.