Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
It may make more sense for me to post this in an Apache forum but I have gotten really great help from this community recently so I figured I'd try here first.
I am running CentOS 5 and Apache 2.2.3 and I am trying to set up a subdomain. I have read several web pages on the matter and tried several different things with no success. I have custom DNS set up at dyndns.com and before I started messing with subdomain stuff everything was working fine. For these purposes we'll say my domain is mydomain.net and I want the subdomain to be admin.mydomain.net. Here is what my /etc/hosts file looks like:
I then created a directory called "admin" in /var/www and put a simple hello world php file there. Now on the internet when I go to admin.mydomain.net I get Server not found "Firefox can't find the server at admin.mydomain.net." and when I go to mydomain.net I get the hello world that I put in the admin directory.
Again, before I started messing with this subdomain business I could go to mydomain.net and it would show the website just fine. What am I doing wrong?!?
I restarted Apache and I still get the same issue. Server not found at admin.mydomain.net and the /var/www/admin/index.php file when I go to mydomain.net instead of the /var/www/html/index.php file I am expecting.
Okay, I think I've made some progress...kinda. I moved my admin directory from /var/admin to /var/www/html/admin
Now when I visit mydomain.net I get the index.php file in /var/www/html like I want/expect and when I visit mydomain.net/admin I get the index.php file in /var/www/html/admin like I guess I would expect. So how do I get admin.mydomain.net to serve me the /var/www/html/admin/index.php like I want? I still get a Server Not Found error when I try to visit admin.mydomain.net.
...by the way, the forum at http://www.apacheforum.com/ is so flooded with spam that I don't see myself getting any help there. Is there another forum you guys would suggest I post to for Apache help?
Last edited by Orange Sunshine; 11-24-2009 at 03:13 PM.
I have no idea what the 208.67.222.222 addresses are but the xx.xxx.xxx.xxx are matching for both and are the correct ip address to my machine. Does that mean it is resolving correctly? Also, I did the nslookup on the web server that is hosting the site. Is that what I was supposed to do? Or do I need to do it on another machine?
Last edited by Orange Sunshine; 11-24-2009 at 03:35 PM.
Also, I did the nslookup on the web server that is hosting the site. Is that what I was supposed to do? Or do I need to do it on another machine?
Just to be sure I tried it on another machine and I got the same results for Non-Authorative answer but different addresses for the first Server:
Address: if that makes any sense.
The ip should match at the machine where you are opening your website in Firefox, if both sub domain and main domain are hosted on same IP. Also, check if you can open your page at web server itself, if it is working there then some problem with name resolution at other machine.
The ip should match at the machine where you are opening your website in Firefox, if both sub domain and main domain are hosted on same IP. Also, check if you can open your page at web server itself, if it is working there then some problem with name resolution at other machine.
Well, something magic happened and everything is working correctly now. I didn't make any changes at all since the last time I checked and it wasn't working. Oh well, I'm not complaining.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.