DeveloperSide.NET Forums
January 17, 2020, 01:41:05 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Please help/ virtual domain configs.  (Read 13157 times)
0 Members and 1 Guest are viewing this topic.
ALEX_GRIM
Member
*
Posts: 3

NEWMETALGOD2000
View Profile WWW Email
« on: October 24, 2004, 09:28:15 AM »

ok, here's the run down;
    i am the webmaster/creator/ of www.grimmusic.com. i had no problems getting people to my site with my configs before, but i never tried to make a sub-d either. so now i have grimmusic.com, and download.grimmusic.com. but the later of the two will not work. it IS getting resolved to my ip, but after that, the configs loose it. i didn't want to bother anyone else with this, so i researched it, and tried different configurations for three months now, all i have achieved is to be able to access BOTH my domain, and sub-d from my local machine but the internet can only access my MAIN domain. what am i doing wrong?
      here is my cnfig file;

Listen 80
ServerRoot "/www/Apache2"

 



NameVirtualHost *:80


<VirtualHost *:80>
        ServerName localhost
        DocumentRoot "/www/grimmusic"
</VirtualHost>


<VirtualHost *:80>
        ServerName www.grimmusic.com
        ServerAlias grimmusic.com
        DocumentRoot "/www/grimmusic"
        <Directory "/www/grimmusic">
                order deny,allow
                allow from all
        </Directory>
</VirtualHost>


<VirtualHost *:80>
        ServerName www.download.grimmusic.com
        ServerAlias download.grimmusic.com
        DocumentRoot "/www/download"
        <Directory "/www/download">
                order deny,allow
                allow from all
        </Directory>
</VirtualHost>





ServerAdmin grim@grimmusic.com

ServerSignature On
ServerTokens Full

DefaultType text/plain
AddDefaultCharset ISO-8859-1

UseCanonicalName On

HostnameLookups Off

ErrorLog logs/error.log
LogLevel error

PidFile logs/httpd.pid

Timeout 300

KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15


<IfModule mpm_winnt.c>
   ThreadsPerChild 250
   MaxRequestsPerChild 0
</IfModule>
**************************************************

if anyone can help i'd be very pleased. thank you in advance for your time; ALEXANDER GRIM
Logged
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #1 on: October 24, 2004, 09:52:44 AM »

When I tried http://download.grimmusic.com -- it resolved and came to a page that said...
this is a temporary page
come back soon to see just what
you can download.


Are you sure this is not a local problem?  We have several examples in this forum on configuring Apache with virtual hosts...
Just search for "virtual host" or any directives, such as "NameVirtualHost".

Are you hosting this site from your local system?  If so, you might need to modify the C:\WINNT\system32\drivers\etc\hosts file (if you are using WinXP, that would start with \Windows instead of \WINNT), but probably only if you did not specify an IP address for your sub-domain with your DNS system or Registrar.  Just note that this file is a "local" resolver and will not have any effect on requests coming from outside.  Its use is in local development and testing, as no DNS server or Registrar is needed.


Here is one example of many examples...
http://forums.devside.net/viewtopic.php?t=273
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #2 on: October 24, 2004, 10:00:01 AM »

Quote


That should be download.grimmusic.com and no ServerAlias is needed.

(make sure that this is also how it is named under your Registrar, and with the correct IP -- also, changes can take anywhere from 5 minutes to 72 hours to propagate throughout the DNS system)

Reboot system or re-start Apache after making changes to httpd.conf

If you have not already fixed this after you post, and this does not fix it for you either...

Check file \www\Apache2\logs\error.log
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
ALEX_GRIM
Member
*
Posts: 3

NEWMETALGOD2000
View Profile WWW Email
« Reply #3 on: October 24, 2004, 08:13:40 PM »

Well, i think what a mojority of the problem was, is the wait to propagate. i haven't changed a thing since i posted my comment, but if you can get to BOTH sites, then i guess it was right, it just needed to propagate. and i read all you forum posts on the subject, but none of them seemed to work for me, at least i though at the time, but evidently they did. i do have one more question on the subject though, in my dns records, i have a LOT of junk and useless records, i tried to make a record for every possable combination i could think of to get to my site. here's what i have under the "grimmusic.com" records at everydns.net;
*************************************************************
NOW EDITING "GRIMMUSIC.COM"
*************************************************************
*.DOWNLOAD.GRIMMUSIC.COM CNAME    GRIMMUSIC.COM
*.GRIMMUSIC.COM                   CNAME     65.27.128.156
*.GRIMMUSIC.COM                   A              65.27.128.156
GRIMMUSIC.COM                      A             65.27.128.156
GRIMMUSIC.COM                      MX          MAIL.GRIMMUSIC.COM  20
GRIMMUSIC.COM                     MX           MAIL.GRIMMUSIC.COM  10
GRIMMUSIC.COM                     MX          MAIL2.GRIMMUSIC.COM  20
GRIMMUSIC.COM                     MX          MAIL2.GRIMMUSIC.COM  10
http://DOWNLOAD.GRIMMUSIC.COM    CNAME   GRIMMUSIC.COM
HTTP://GRIMMUSIC.COM          A             65.27.128.156
HTTP://GRIMMUSIC.COM         MX           MAIL.GRIMMUSIC.COM   10
HTTP://GRIMMUSIC.COM          MX          MAIL.GRIMMUSIC.COM   20
HTTP://WWW.DOWNLOAD.GRIMMUSIC.COM     CNAME   GRIMMUSIC.COM
HTTP://WWW.GRIMMUSIC.COM   A         65.27.128.156
HTTP://WWW.GRIMMUSIC.COM   MX        MAIL.GRIMMUSIC.COM  10
MAIL.GRIMMUSIC.COM              A           65.27.128.156
MAIL2.GRIMMUSIC.COM            A               65.27.128.156
WWW.DOWNLOAD.GRIMMUSIC.COM    CNAME     GRIMMUSIC.COM
WWW.GRIMMUSIC.COM          A                        65.27.128.156
WWW.GRIMMUSIC.COM         MX          MAIL.GRIMMUSIC.COM     20
WWW.GRIMMUSIC.COM           MX         MAIL.GRIMMUSIC.COM    10
*************************************************************

as you can see by my pile of obviously unnessecary junk, i'm not too sure about what i'm doing here. i think my mx records are a waste of space, and that i only need two of them, but i'm not sure, so i havent chanced it. but anyway, i also made another record profile on everydns.net  for download.grimmusic.com, and i don't think i need that profiles records AT ALL. but i don't want to chance deleting it, and needing it after all. here's the records for that profile;
*************************************************************
NOW EDTING "DOWNLOAD.GRIMMUSIC.COM"
*************************************************************
*.DOWNLOAD.GRIMMUSIC.COM                     CNAME     GRIMMUSIC.COM

DOWNLOAD.GRIMMUSIC.COM                        CNAME    GRIMMUSIC.COM
   
HTTP://DOWNLOAD.GRIMMUSIC.COM             CNAME    GRIMMUSIC.COM

HTTP://WWW.DOWNLOAD.GRIMMUSIC.COM    CNAME    GRIMMUSIC.COM
   
WWW.DOWNLOAD.GRIMMUSIC.COM               CNAME    GRIMMUSIC.COM
   
*************************************************************
 basically what i'm saying is this; my server is  sending, and recieving mail fine, and it's serving the http fine, but i want to know WHICH records are making it work, so i can clear unnecessary space. also, my entries for my local machine, in the /sys32/drivers/etc/hosts look like this,
*************************************************************
127.0.0.1       www.grimmusic.com
127.0.0.1       www.download.grimmusic.com
************************************************************* and are working fine, i can access both sites now from my local machine.
so can i assume that's the proper way to put it to were it resolves in my configs file?  also, you said that i did NOT need a server ALIAS at all for my download sub-d, does that apply to ALL sub-d's? so my configs should look like this?;
*************************************************************
Listen 80
ServerRoot "/www/Apache2"


NameVirtualHost *:80


<VirtualHost *:80>    (is THIS tag even necessary?)
        ServerName localhost        
        DocumentRoot "/www/grimmusic"
</VirtualHost>


<VirtualHost *:80>
       ServerName www.grimmusic.com(should the www be removed here?)
       ServerAlias grimmusic.com       (should this line be removed as well?)
       DocumentRoot "/www/grimmusic"
       <Directory "/www/grimmusic">
                order deny,allow
                allow from all
        </Directory>
</VirtualHost>


<VirtualHost *:80>
        ServerName download.grimmusic.com    (no www or http here?)
        DocumentRoot "/www/download"
        <Directory "/www/download">
                order deny,allow
                allow from all
        </Directory>
</VirtualHost>
*************************************************************
does that seem to be a correct format? also, for each NEW sub-d i create,
is the new virtual tags going to be like this?:
*************************************************************
<VirtualHost *:80>
        ServerName new_sub-d.grimmusic.com    (no server alias?)
        DocumentRoot "/www/new subdomain"
        <Directory "/www/new subdomain">
                order deny,allow
                allow from all
        </Directory>
</VirtualHost>
*************************************************************
thank you very much for your time. also, i was wondering if this site accepts donations for helping people out? thanks again in advance for you time;  ALEXANDER GRIM
Logged
Jorge
Customer, Basic Support
Guru
*****
Posts: 544

jorge_schrauwen@msn.com
View Profile WWW
« Reply #4 on: October 25, 2004, 09:04:02 AM »

i'm no expert on DNS far from it, but well your record seems a bit of a mess,
you degine specific domains more that once and stuff.

maybe you should try and clean it up a bit, for example:
HTTP://GRIMMUSIC.COM A 65.27.128.156 , the HTTP:// isn't part of the domain! its a protocal so it schould be there.
I also see no reason for having 2 mail server when there pointed to the same machine.
I'm also about 90% sure a CNAME can't point to and IP sinds thats whare an A record is for.

well i'll shutup now sinds i don't have anything more usefull to say...
Logged

admin
Administrator
Master of All Subjects
*****
Posts: 3272


View Profile WWW Email
« Reply #5 on: October 25, 2004, 04:17:00 PM »

The following does not make any sense (as pointed out before)...
Code:
www.download.grimmusic.com


...and should be replaced with...
Code:
download.grimmusic.com


Also, you should consult any help files that your DNS provider has and check the Apache docs on virtual hosting.
Logged

DeveloperSide.NET
Advanced PHP and MySQL Solutions for your Web Design and Development needs with Web.Developer Server Suite.
ALEX_GRIM
Member
*
Posts: 3

NEWMETALGOD2000
View Profile WWW Email
« Reply #6 on: October 29, 2004, 12:56:50 AM »

HEY ADMIN, I DID AS YOU SUGGESTED WITH MY CNAME, BUT SOME PEOPLE ARENT ABLE TO FIND THE SUB-D IF THEY USE "wWW" PRIOR TO THE ADDY NOW? I THINK THEY MIGHT JUST BE STUPID, BECAUSE OTHERS ARE ABLT TO GET THERE STILL.
      I DO HAVE ONE OTHER QUESTION THOUGH. I'M NOT SURE IF THIS SITE HANDELS SOMETHING AS PETTY AS HTML QUESTIONS, BUT THE HTML SITES I WENT TO MENTIONED NOTHING ABOUT MY HTML PROBLEM.
      YOU KNOW IF YOU HAVE A FOLDER NAMED "GRIMMUSIC" AND IN ONE OF THE HTML PAGES WITHIN THE FOLDER , THERE IS A HYPERTEXT REFERENCE TO AN ITEM INSIDE ANOTHER FOLDER WITHIN GRIMMUSIC, ALL YOU HAVE TO PUT IN IS; "/MUSIC/INDEX.HTML" PRETTY ELEMENTARY RIGHT? MY QUESTION TO YOU IS, IF I AM ON INDEX.HTML, IN THE /GRIMMUSIC/MUSIC/* FOLDER, THEN HOW DO I LINK UP IN MY DIRECTORY?
      FOR INSTANCE, I'M WE ARE ON "/GRIMMUSIC/MUSIC/INDEX2.HTML", THEN HOW CAN I REF TO AN IMAGE FOR THAT PAGE IF THE IMAGE IS IN "/GRIMMUSIC/NULL.jpg"? I CAN'T SEEM TO FIGURE OUT HOW TO LINK BACKWARDS THROUGH THE DIRECTORY.
      ALSO, AM I NOT ABLE TO REF TO AN IMAGE OR HTML PAGE, OR ANYTHING IN ANOTHER SUBDOMAINS ROOT DIR, WITHOUT PUTTING IN THE URL? WHEN I TRY TO DO IT WITH JUST FILE DIR REFRENCING, IT DOESN'T SEEM TO WORK. I'VE BEEN TRYING TO REF BACK & FORTH BETWEEN DOWNLOAD.GRIMMUSIC.COM, AND GRIMMUSIC.COM, WITHOUT THE URL IN MY HTML SCRIPTS FOR FILES I NEED FROM ONE ANOTHER, I'VE BEEN TRYING TO DO IT WITH THE DIRECTORY INSTEAD, OBVIOUSLY WITH PATHNAMES ONLY, NO C:\ OR ANYTHING LIKE THAT. THANKS FOR YOUR TIME.
Logged
Jorge
Customer, Basic Support
Guru
*****
Posts: 544

jorge_schrauwen@msn.com
View Profile WWW
« Reply #7 on: October 29, 2004, 05:10:39 AM »

well to ge back to the preveuw folder you would use seomthing like
../image/back.jpg
and to if your lets say in /files/images/screens/apache/php
and you want to refure to /files/index.html you would put
./files/index.html
Logged

Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.9 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!