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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T18:22:13+00:00 2026-05-30T18:22:13+00:00

I have an Apache server configured with several configuration files in which I declare

  • 0

I have an Apache server configured with several configuration files in which I declare VirtualHost’s. However, when I access my server for one of the given ServerName it is not respected and defaults to another one.

My configurations is as followed:

In a ports.conf file I have this:

NameVirtualHost *:80
Listen 80

Then in another file, I have this:

<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName my.server.com
    ServerAlias other.server.com
    DocumentRoot /home/mys/
    Alias / /home/mys/
    ErrorLog /var/log/apache2/mys-error.log
    <Directory /home/mys/>
        Options Includes Indexes FollowSymLinks MultiViews
        AllowOverride AuthConfig
        Order allow,deny
        allow from all
    </Directory>

</VirtualHost>

In another file I have this

<VirtualHost *:80>
    ServerName something.server.com
    ServerAlias else.server.com
    Redirect permanent / https://something.server.com
</VirtualHost>

And I have a configuration on port 443 for something.server.com which works ok

When I call http://my.server.com, I end up on https://something.server.com
All hostnames point to the same IP.

I am running on Apache/2.2.9 (Debian)

Any hint or ideas would be much appreciated. I am not an Apache expert so if I need to provide more info or formulate this in another way, just let me know.

  • 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-30T18:22:14+00:00Added an answer on May 30, 2026 at 6:22 pm

    OK, actually this is working fine, but because I indicated a Permanent Redirect, Firefox cached the redirect. So nothing wrong in the configuration (although one might say that is probably dangerous to indicate a permanent redirect).

    • 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 web.py configured for my Apache server by installing flups. However when I
I have a mongrel server running behind Apache. It works fine; however, every now
I have configured my apache 2.2 server as a simple forward proxy using mod_proxy
I have configured an Apache HTTP server + load balancer (utilizing the mod_proxy_balancer) When
I have a web server (Apache) and configured a CA on this machine to
I have my server's apache configured to redirect every request into index.php, so that
I have a tomcat server configured (by mod_jk) to work through Apache Httpd server.
I have apache web server installed as frontend and I have j2ee SAP Netweaver
I have my Apache http server running on localhost:80 and restlet server on localhost:8182,

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.