Solved

Apache2 Server on Ubuntu

Posted on 2014-11-19
1
93 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

If you are running a LAMP infrastructure, this little code snippet is very helpful if you are serving lots of HTML, JavaScript and CSS-related information. The mod_deflate module, which is part of the Apache 2.2 application, provides the DEFLATE…
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 …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

730 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