Solved

Apache2 Server on Ubuntu

Posted on 2014-11-19
1
90 Views
Last Modified: 2014-11-20
By following the Ubuntu Apache2 configuration documentation, and also watching some YouTube videos, I have configured my Apache2 server with three hosts configuration files with the original "000-default.conf", plus adding the two following configuration files that were duplicated from "000-default.conf", and renamed as follows:

000-default.conf renamed to "cissymccaa.com.conf"
000-default.conf renamed to "ridertek.com.conf".

I made the following changes to the default copies:

ridertek.com.conf was modified with these changes:
servername ridertek.com
serveralias www.ridertek.com
serveradmin admin@ridertek.com
documentroot /var/www/html/ridertek.com/index.html

I made similar changes to cissymccaa.com.conf:
servername cissymccaa.com
serveralias www.cissymccaa.com
serveradmin admin@ridertek.com
documentroot /var/www/html/cissymccaa.com/index.html

The HTML code for the two new sites was placed into directories as below:

site www.ridertek.com HTML was placed into directory /var/www/html/ridertek.com
site www.cissymccaa.com HTML was place into directory /var/www/html/cissymccaa.com

Both site's directory and files where chown and chgrp as "www-data"

Due to the "serveralias" parameter, I am expecting either URL in a browser external to LAN to be able to reach my site with either http://www.ridertek.com, or http://ridertek.com. However, I can only reach http://www.ridertek.com.

If I enter: http://ridertek.com, or second site, http://www.cissymccaaa.com and it's alias http://cissymccaa.com, I only get the apache2 default site.

On the other hand, within the LAN, if I enter: 192.168.1.94/ridertek.com, or: 192.168.1.94/cissymccaa.com, I will reach both sites with no problem. In the LAN, if I enter: 192.168.1.94/www.ridertek.com, or: 192.168.1.94/www.cissymccaa.com, I get message that server is not found.

I have checked my domain name service and find both www.ridertek.com and ridertek.com, plus www.cissymccaa.com and cissymccaa.com to point to my server's IP address.

What am I doing wrong here?
0
Comment
Question by:RayRider
1 Comment
 

Accepted Solution

by:
RayRider earned 0 total points
ID: 40455155
I see my question has been marked "neglected". Apparently nobody who is Apache2 experienced can see my question.

I have fixed the problem but not totally sure what I did other than remove "index.html" for the documentroot parameter, and reverse servername and serveralias, and only later did I see it work correctly. Not sure about why a time delay. Maybe something in dns cache.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.

929 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now