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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:26:08+00:00 2026-05-23T03:26:08+00:00

first time poster, but please help. I have been searching and reconfiguring for 6

  • 0

first time poster, but please help. I have been searching and reconfiguring for 6 days now and have lost several clumps of hair..

PROBLEM:
I want 2+ virtual hosts on my ubuntu server (1 ip)
BUT – Only the first “alphabetically” listed sites-enabled shows.
000-default
http://www.domain1.com
http://www.domain2.com

Individually they all work (if i a2dissite for each leaving 1)

CONFIG:
UBUNTU 10.10 Server
EC2 instance (dont shoot me for this part – hoping this isnt the issue!)
APACHE 2.2.16
DNS my.domain.com
– to my public ec2 dns (this works)

Virtual Hosts:

default

<VirtualHost *:80>
        DocumentRoot "/home/www/"
        <Directory />
        Options FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Satisfy all
        </Directory>
        <Directory /home/www>
        Options Indexes Multiviews FollowSymLinks
        AllowOverride all
        Order allow,deny
        Allow from all
        </Directory>
        LogLevel debug
        ErrorLog /home/www/logs/error.log
        CustomLog /home/www/logs/access.log "combined"
</VirtualHost>

Virtual Host 1 – domain1

<VirtualHost *:80>
        ServerAdmin webmaster@domain1.com
        ServerName domain1.com
        ServerAlias domain1.com www.domain1.com
        # Indexes + Directory Root.
        DirectoryIndex index.php
        DocumentRoot "/home/www/www.domain1.com/"
        # Directory directive
        <Directory "/home/www/www.domain1.com">
                Options Indexes Multiviews FollowSymLinks
                AllowOverride none
                Order allow,deny
                Allow from all
        </Directory>
        # CGI Directory
        ScriptAlias /cgi-bin/ /home/www/www.domain1.com/cgi-bin
        <Location /cgi-bin>
                Options +ExecCGI
        </Location>
        # Logfiles
        LogLevel debug
        ErrorLog "/home/www/www.domain1.com/logs/error.log"
        CustomLog "/home/www/www.domain1.com/logs/access.log" combined
</VirtualHost>

I also have the above for domain2 in another document root with a different domain name

sym links are in place:
my apache2ctl -St shows the following –
VirtualHost configuration:

*:80       is a NameVirtualHost
         default server  (/etc/apache2/sites-enabled/000-default:4)
         port 80 namevhost  (/etc/apache2/sites-enabled/000-default:4)
         port 80 namevhost domain1.com (/etc/apache2/sites-enabled/www.domain1.com:4)
         port 80 namevhost www.domain2.com (/etc/apache2/sites-enabled/www.domain2.com:4)
Syntax OK

My ports.conf:
NameVirtualHost *:80
Listen 80

<IfModule mod_ssl.c>
    NameVirtualHost *.443
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

No changes from default to my apache2.conf and httpd.conf is empty.

I have tried the following (and about a hundred others):

[URL=”http://ubuntu-tutorials.com/2008/01/09/setting-up-name-based-virtual-hosting/”%5D%5B/URL%5D
[URL=”http://httpd.apache.org/docs/2.2/rewrite/vhosts.html”]http://httpd.apache.org/docs/2.2/rewrite/vhosts.html[/URL]
[URL=”http://ubuntuforums.org/archive/index.php/t-1466665.html”]http://ubuntuforums.org/archive/index.php/t-1466665.html[/URL]
[URL=”http://flurdy.com/docs/ec2/basics/index.html”]http://flurdy.com/docs/ec2/basics/index.html[/URL]
[URL=”http://www.webmasterworld.com/apache/3282118.htm”]http://www.webmasterworld.com/apache/3282118.htm[/URL]

it seems i have tried everything that everyone else is having issues with but nothing seems to fix mine.

Possibilities:
1) EC2
2) Permissions on the files – I changed everything to the apache2 user “www-data” – no dice.
3) I am a dope…lets hope its that and one of you kind people point me to my issue. 🙂

Chat soon…ill be over here losing my hair.
Regards, Logansanoh

  • 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-23T03:26:09+00:00Added an answer on May 23, 2026 at 3:26 am

    DNS was the culprit.
    Everything was being passed as expected in both EC2, Ubuntu and Apache. The problem was I was using URL redirect at the DNS. This is stoopid! It was so simple, I set up an ANAME instead using my public IP address for the alias (www.domain1.com) and the same for the (www.domain2.com) and it all worked perfectly.
    Now if i could only get TOMCAT to behave with mod_proxy i will be 100% there!!

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

Sidebar

Related Questions

Long time reader, first time poster. Any help is greatly appreciated. I have crafted
First time Stack Overflow poster. Please bear with me! :) I have a set
first time poster. Please be gentle. This topic may be similar to several other
First time poster. Im totally new to Android but I have manged to dreate
First time poster so please bear with me. Basically I have a pdf document
first time poster and TDD adopter. :-) I'll be a bit verbose so please
First time poster, so please excuse any stupidity. I'm working on porting a custom
First time poster here but definitely not a first time reader. My question is
First time poster so sorry if this is too long, but I've hit a
First time poster, long time reader. I've been having a problem with figuring this

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.