Solved

Apache2 Server on Ubuntu

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

As Wikipedia explains 'robots.txt' as -- the robot exclusion standard, also known as the Robots Exclusion Protocol or robots.txt protocol, is a convention to prevent cooperating web spiders and other web robots from accessing all or part of a websit…
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 …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

746 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

12 Experts available now in Live!

Get 1:1 Help Now