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
Solved

Apache2 Server on Ubuntu

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In my time as an SEO for the last 2 years and in the questions I have assisted with on here I have always seen the need to redirect from non-www urls to their www versions. For instance redirecting http://domain.com (http://domain.com) to http…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

840 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