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

  • Home
  • SEARCH
  • 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 8472089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T16:58:17+00:00 2026-06-10T16:58:17+00:00

I have a Magento installation with multiple websites, which is running in Apache web

  • 0

I have a Magento installation with multiple websites, which is running in Apache web server.
Now I want to move these to Nginx web server; how can I achieve this with Nginx configuration?
Below is the htaccess code which is redirecting websites:

SetEnvIf HOST 44\.55\.222\.101\:8080 MAGE_RUN_CODE=website_new
SetEnvIf HOST 44\.55\.222\.101\:8080 MAGE_RUN_TYPE=website

Please help.

  • 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-10T16:58:19+00:00Added an answer on June 10, 2026 at 4:58 pm

    To run 2 Magento websites on the same server with different ports you bave to use 2 different nginx configuration files for each port under /etc/nginx/conf.d/.

    From the example provided it seems like you are running the websites on ports 80 and 8080. The Magento has provided the default nginx configuration here at http://www.magentocommerce.com/wiki/1_-_installation_and_configuration/configuring_nginx_for_magento

    Use this for port 80 and for 8080 use the below code:

    server {
        listen 8080 default;
        server_name 44.55.222.101; 
        root /var/www/html;
        location / {
            index index.php index.html index.htm;
            try_files $uri $uri/ @handler;
            expires 30d;
        }
        location ^~ /app/ { deny all; }
        location ^~ /includes/           { deny all; }
        location ^~ /lib/                { deny all; }
        location ^~ /media/downloadable/ { deny all; }
        location ^~ /pkginfo/            { deny all; }
        location ^~ /report/config.xml   { deny all; }
        location ^~ /var/                { deny all; }
        location /var/export/ {
            auth_basic           "Restricted";
            auth_basic_user_file htpasswd;
            autoindex            on;
        }
        location  /. {
            return 404;
        }
        location @handler {
            rewrite / /index.php;
        }
        location ~ .php/ {
            rewrite ^(.*.php)/ $1 last;
        }
        location ~ .php$ {
            if (!-e $request_filename) { rewrite / /index.php last; } 
            expires        off;
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_param  HTTPS $fastcgi_https;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  MAGE_RUN_CODE website_new; 
            fastcgi_param  MAGE_RUN_TYPE website;
            include        fastcgi_params; 
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to get a magento installation to run multiple websites I have
i have 3 websites running over one Magento installation and 3 admin users for
I have a single Magento install running two different websites. One sells ebooks and
I have recently moved a magento installation of version 1.5.0.1 to a live server
I have a magento site running on nginx with php-fcgi. I have set up
I have a made a mess of my Magento installation using modman and now
i have magento 1.6.2 running on a dedicated server (ubuntu 10.04 lts) I have
I currently have Magento set up on a development server (remote, SSH access) and
I have a Magento install with multiple domains (domain1.com, domain2.com) sharing a single checkout
We have a magento 1.5.1 installed on our server. In that the default currency

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.