Jump to content

Recommended Posts

this part was really confusing me

 

<VirtualHost>
  ServerName mydomain.com
  ServerAlias www.mydomain.com
  DocumentRoot /www/mydomain.com // and this here
</VirtualHost>

<VirtualHost>
  ServerName mail.mydomain.com
  DocumentRoot /www/mail.mydomain.com //this here
</VirtualHost>

 

But I got it working ne how by trying different combos

 

finally got it working by say this instead

 

DocumentRoot mypath/webmail //WITHOUT THE mail.mydomain.com.. that is what is so confusing about it.. and all the examples have this.

 

but i did get it working.. thanks for the help thorpe..

 

Yeah, those examples are based on the fact that I normally name my directories the same as the domains that point to them. Just seems more logical when you have many different domains.

well I thought I had this solved last nite but I do not..

 

Once I went back and checked mail.mysite.com it worked and went to the right place..

 

but then once I checked

 

mysite.com

 

it went to the same place as mail.mysite.com and it should not..

 

I tried messing around with it alot last nite but to no avail.

 

so its still not working for me..

 

Once I thought I had it but then it said that my website was requiring that I login.

and neither mail.mysite.com or mysite.com would work.

 

I'm finding it hard to believe this is so simple being that I've setup everything else with such ease..

I mean installing and configuring apache with mysql and php5 was easier time then i'm having with this.

 

the examples on apache.org say to do this

 

NameVirtualServer *:80

<VirtualHost *:80>
ServerName mail.mysite.com
DocumentRoot /htdocs/webmail   //Still getting confused on this part.. where does the this start at?
</VirtualHost>

<VirtualHost *:80>
ServerName mysite.com
DocumentRoot /htdocs
</VirtualHost>

 

my web root is htdocs.. the default for apache.

 

when i put the above code into my httpd.conf

file thats when I get the "This website requires you to login" message

 

when I take it back out it all just goes to the webroot.

 

Am I missing something?

 

should I make a new set of directories??

 

I seen an example that said to do this

 

c:/vhosts/site1

and

c:/vhosts/site2

 

do you think that would be better then just htdocs and htdocs/webmail?

Am I missing something?

 

I thought you where using windows? Your paths should look more like...

 

NameVirtualServer *:80

<VirtualHost *:80>
  ServerName mail.mysite.com
  DocumentRoot "C:\htdocs\webmail"   //Still getting confused on this part.. where does the this start at?
</VirtualHost>

<VirtualHost *:80>
  ServerName mysite.com
  DocumentRoot "C:\htdocs"
</VirtualHost>

 

Should they not? Sorry, I'm not a windows user, but that makes more sense to me in a windows environment.

 

What does the DocumentRoot directive look like in the main section of your httpd.conf file? That will give you a hint as to how these others should be written.

well in the norm

 

its says C:\blah\blah\htdocs like you say..

 

but the examples said it should be the other way..

 

yeah, because most examples are written for *nix, not windows.

 

why would I be getting the "This website requires you to login" message tho?

 

Have you got a router connecting you to the internet via adsl? I used to get a pop-up login prompt generated by my router when I tried to go to a site that did not exist. This was in fact the prompt to login to my routers config. Maybe you have something similar?

Yup that did it.. working well now..

 

with this config

 

 

NamVirtualHost *:80

<VirtualHost *:80>
ServerName www.mysite.com
ServerAlias mysite.com
DocumentRoot C:\blah\blah\htdocs
</VirtualHost>

<VirtualHost *:80>
ServerName mail.mysite.com
DocumentRoot C:\blah\blah\htdocs\webmail
</VirtualHost>

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.