Solved

Apache2 Server on Ubuntu

Posted on 2014-11-19
1
94 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Turn your laptop into a mobile console!

The CV211 Laptop USB Console Adapter provides a direct Laptop-to-Computer connection for fast and easy remote desktop access with no software to install.

Question has a verified solution.

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

If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

726 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