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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T16:58:44+00:00 2026-05-15T16:58:44+00:00

I have configured Apache virtual hosting on port 8080 to point to my magento

  • 0

I have configured Apache virtual hosting on port 8080 to point to my magento website.

        Listen 8080

        <VirtualHost 6x.2x.6x.1x:8080>

    ServerAdmin webmaster@localhost
    ServerName domainname.com
ServerAlias *.domainname.com
DocumentRoot /var/www/sites/domain/

    <Directory />
            Options FollowSymLinks
            AllowOverride all
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog /var/log/apache2/error.log

    # Possible values include: debug, info, notice, warn, error, crit,
    # alert, emerg.
    LogLevel warn

    CustomLog /var/log/apache2/access.log combined
    ServerSignature On

<LocationMatch ".*\svn.*">
    Order allow,deny
    Deny from all
</LocationMatch>

           </VirtualHost>

When i go to the website http://www.domain.com:8080 the js, css, img and other things are not loaded because the port is not attached to the links

Here is a rewrite rule in magento .htaccess that does not seem to work:

         <IfModule mod_rewrite.c>

############################################
## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

############################################
## you can put here your magento root folder
## path relative to web root

    #RewriteBase /magento/

############################################
## workaround for HTTP authorization
## in CGI environment

    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

############################################
## always send 404 on missing files in these folders

    RewriteCond %{REQUEST_URI} !^/(media|skin|js)/

############################################
## never rewrite for existing files, directories and links

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-l

############################################
## rewrite everything else to index.php
    RewriteCond %{SERVER_PORT} !^8080$
    RewriteRule .* http://6x.2x.6x.1x:8080/index.php [L]

       </IfModule>

Is Rewrite-mod the right solution to run magento site on different port? If yes, where is my mistake in the current Rewrite rule?

thank you,

Margots

  • 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-05-15T16:58:45+00:00Added an answer on May 15, 2026 at 4:58 pm

    I manage a magento site where a live shop is running on one server on port 80 and a dev site is running on another server on port 3000. When copying the site from live to dev all I need to do is change two rows in the core_config_data table, having:

    • path=”web/unsecure/base_url”
    • path=”web/secure/base_url”

    You need to add your port number at the end of the url and that is all. In my case those two rows look like this:

    (config_id, scope, scope_id, path,
    value)

    (default, 0, web/unsecure/base_url,
    ,http://www.dev-server.com:3000/)

    (default, 0, web/secure/base_url,
    ,http://www.dev-server.com:3000/)

    Note that I don’t have a certificate on my dev server so I am not using https as the secure base_url. If you wish to use https this setting should be changed to https and you should omitt the custom port at the end.

    Modification of the standard .htaccess file is not needed, and should probably be avoided.

    EDIT

    If you don’t have access to the DB you can try creating a php file which will modify the database using magento:

    <?php
    error_reporting(E_ALL);
    ini_set('display_errors', '1');
    
    require_once ( "app/Mage.php" );
    Mage::app('default');
    
    $db = Mage::getSingleton('core/resource')->getConnection('core_write');
    
    $db->query("UPDATE `core_config_data` SET `value` = 'http://dev-server.com:3000/' WHERE `path` = 'web/secure/base_url';");
    
    $db->query("UPDATE `core_config_data` SET `value` = 'http://dev-server.com:3000/' WHERE `path` = 'web/unsecure/base_url';");
    ?>
    

    You need to put this file in the root magento folder or change the path to Mage.php if you put it somewhere else.

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

Sidebar

Related Questions

I have configured apache to froward request to tomcat. following are my configuration. <VirtualHost
I have already configured my apache(mod_rewrite,alias,allowOverride), and I am trying to rewrite http://localhost/b33m/view_blog_details.php?post_id=4 To
I have configured Apache httpd to work as a forward proxy server. How can
I have configured my Apache by myself and have tried to load phpMyAdmin on
Using CentOS5, I have Apache configured with the following directives. Alias /pscript/ /var/www/pscript/ <Directory
I have configured Mod Security on Apache 2.2.21 and i have successfully configured Mod
First, I have svn configured to be accessible via apache DAV. Then I have
I have configured my apache 2.2 server as a simple forward proxy using mod_proxy
I have configured my Django app to run under Apache+FastCGI on Linux (Ubuntu, if
I have configured apache with mod_jk, to redirect the /taste context to my application

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.