Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

Virtual Hosts

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  eunf soie nrorne odneonf  
Author Message
materialised

External


Since: Oct 22, 2003
Posts: 8



(Msg. 1) Posted: Wed Oct 22, 2003 7:11 pm
Post subject: Virtual Hosts
Archived from groups: alt>apache>configuration (more info?)

Hi everyone, I am new to apache, so if my question is answered in the
groups faq, or on the apache web site, feel free to tell me to f**k off
and read there.
However I have looked through the manual, and cant find any reference to
the issues im having. So if anyone could help me, I would be greatfull.

Ok, a friend recently asked me to host her domain on my system, and
there are various subdomains too. All of these now resolve to my IP
address.

I have set up the following virual host in my httpd.conf (the details
match the users details on my system)

<VirtualHost angryphase.purehacker.com >
ServerAdmin angryphase DeleteThis @purehacker.com
DocumentRoot /usr/home/angryphase/public_html
ServerName angryphase.purehacker.com
ErrorLog /usr/home/angryphase/error_log
CustomLog /usr/home/angryphase/access_log common
</VirtualHost>

Now the problem is if I browse to httpd://angryphase.purehacker.com I
get the users website. But if I browse to http://www.purehacker.com I
also see the user who I set the virual host up for's website. And not
the main sites website.

I am racking my brain trying to figure out the problem here, if someone
could point out to me what the issue is, I would be most greatfull.

Thanks in advance

Mick

 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Wed Oct 22, 2003 7:11 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Materialised <materialised RemoveThis @privacy.net> wrote:
 > various subdomains too. All of these now resolve to my IP
 > address.
 > <VirtualHost angryphase.purehacker.com >
 > ServerAdmin angryphase RemoveThis @purehacker.com
 > DocumentRoot /usr/home/angryphase/public_html
 > ServerName angryphase.purehacker.com
 > ErrorLog /usr/home/angryphase/error_log
 > CustomLog /usr/home/angryphase/access_log common
 > </VirtualHost>

Try like this:

NameVirtualHost *

<VirtualHost *>
<font color=purple>  ServerName <a style='text-decoration: underline;' href="http://www.whatever...</font" target="_blank">www.whatever...</font</a>>
  ...other things as in your configuration...
</VirtualHost>

<VirtualHost *>
  ServerName angryphase.whatever...
  ...other things as in your configuration...
</VirtualHost>

Davide<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
materialised

External


Since: Oct 22, 2003
Posts: 8



(Msg. 3) Posted: Wed Oct 22, 2003 7:30 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Davide Bianchi wrote:
 > Materialised <materialised.RemoveThis@privacy.net> wrote:
 >
  >>various subdomains too. All of these now resolve to my IP
  >>address.
  >><VirtualHost angryphase.purehacker.com >
  >> ServerAdmin angryphase.RemoveThis@purehacker.com
  >> DocumentRoot /usr/home/angryphase/public_html
  >> ServerName angryphase.purehacker.com
  >> ErrorLog /usr/home/angryphase/error_log
  >> CustomLog /usr/home/angryphase/access_log common
  >></VirtualHost>
 >
 >
 > Try like this:
 >
 > NameVirtualHost *
 >
 > <VirtualHost *>
<font color=green>  > ServerName <a style='text-decoration: underline;' href="http://www.whatever...</font" target="_blank">www.whatever...</font</a>>
  > ...other things as in your configuration...
 > </VirtualHost>
 >
 > <VirtualHost *>
  > ServerName angryphase.whatever...
  > ...other things as in your configuration...
 > </VirtualHost>
 >
 > Davide
Cool, that did the trick, thanks very much Smile<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
materialised

External


Since: Oct 22, 2003
Posts: 8



(Msg. 4) Posted: Wed Oct 22, 2003 7:47 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Materialised wrote:
 > Hi everyone, I am new to apache, so if my question is answered in the
 > groups faq, or on the apache web site, feel free to tell me to f**k off
 > and read there.
 > However I have looked through the manual, and cant find any reference to
 > the issues im having. So if anyone could help me, I would be greatfull.
 >
 > Ok, a friend recently asked me to host her domain on my system, and
 > there are various subdomains too. All of these now resolve to my IP
 > address.
 >
 > I have set up the following virual host in my httpd.conf (the details
 > match the users details on my system)
 >
 > <VirtualHost angryphase.purehacker.com >
 > ServerAdmin angryphase.TakeThisOut@purehacker.com
 > DocumentRoot /usr/home/angryphase/public_html
 > ServerName angryphase.purehacker.com
 > ErrorLog /usr/home/angryphase/error_log
 > CustomLog /usr/home/angryphase/access_log common
 > </VirtualHost>
 >
 > Now the problem is if I browse to <a style='text-decoration: underline;' href="httpd://angryphase.purehacker.com" target="_blank">httpd://angryphase.purehacker.com</a> I
 > get the users website. But if I browse to <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">http://www.purehacker.com</a> I
 > also see the user who I set the virual host up for's website. And not
 > the main sites website.
 >
 > I am racking my brain trying to figure out the problem here, if someone
 > could point out to me what the issue is, I would be most greatfull.
 >
 > Thanks in advance
 >
 > Mick
 >
Just one more quick question

Will the virtual hosts for users use the rules that I defined when I
enabled the user dir?
It seems when using the virtualhosts I have set up, I cant list
directory contents.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 5) Posted: Wed Oct 22, 2003 7:47 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Materialised <materialised.DeleteThis@privacy.net> wrote:
 > It seems when using the virtualhosts I have set up, I cant list
 > directory contents.

You can specify all the options in the single <VirtualHost *> block.
Listing directory contents is usually a bad practice and should be
turned off by default.

Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
user2375

External


Since: Jul 16, 2003
Posts: 13



(Msg. 6) Posted: Wed Oct 22, 2003 8:17 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <bn66mc$tgvjm$1@ID-204621.news.uni-berlin.de>,
Materialised <materialised.TakeThisOut@privacy.net> wrote:

 > <VirtualHost angryphase.purehacker.com >
 > ServerAdmin angryphase.TakeThisOut@purehacker.com
 > DocumentRoot /usr/home/angryphase/public_html
 > ServerName angryphase.purehacker.com
 > ErrorLog /usr/home/angryphase/error_log
 > CustomLog /usr/home/angryphase/access_log common
 > </VirtualHost>
 >
 > Now the problem is if I browse to <a style='text-decoration: underline;' href="httpd://angryphase.purehacker.com" target="_blank">httpd://angryphase.purehacker.com</a> I
 > get the users website. But if I browse to <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">http://www.purehacker.com</a> I
 > also see the user who I set the virual host up for's website. And not
 > the main sites website.
 >
 > I am racking my brain trying to figure out the problem here, if someone
 > could point out to me what the issue is, I would be most greatfull.


Try <VirtualHost *> instead of <VirtualHost angryphase.purehacker.com >
Be sure to have a vhost for purehacker.com (ServerName purehacker.com
and ServerAlias <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">www.purehacker.com</a> in this vhost).


patpro
--
je cherche un poste d'admin-sys Mac/UNIX
(ou une jeune et jolie femme riche)
<a style='text-decoration: underline;' href="http://patpro.net/cv.php" target="_blank">http://patpro.net/cv.php</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
materialised

External


Since: Oct 22, 2003
Posts: 8



(Msg. 7) Posted: Wed Oct 22, 2003 8:17 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

patpro wrote:
 > In article <bn66mc$tgvjm$1@ID-204621.news.uni-berlin.de>,
 > Materialised <materialised.TakeThisOut@privacy.net> wrote:
 >
 >
  >><VirtualHost angryphase.purehacker.com >
  >> ServerAdmin angryphase.TakeThisOut@purehacker.com
  >> DocumentRoot /usr/home/angryphase/public_html
  >> ServerName angryphase.purehacker.com
  >> ErrorLog /usr/home/angryphase/error_log
  >> CustomLog /usr/home/angryphase/access_log common
  >></VirtualHost>
  >>
  >>Now the problem is if I browse to <a style='text-decoration: underline;' href="httpd://angryphase.purehacker.com" target="_blank">httpd://angryphase.purehacker.com</a> I
  >>get the users website. But if I browse to <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">http://www.purehacker.com</a> I
  >>also see the user who I set the virual host up for's website. And not
  >>the main sites website.
  >>
  >>I am racking my brain trying to figure out the problem here, if someone
  >>could point out to me what the issue is, I would be most greatfull.
 >
 >
 >
 > Try <VirtualHost *> instead of <VirtualHost angryphase.purehacker.com >
 > Be sure to have a vhost for purehacker.com (ServerName purehacker.com
 > and ServerAlias <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">www.purehacker.com</a> in this vhost).
 >
 >
 > patpro
Thanks for your reply.

Ok, I think I uderstood that, but if I have gotten your instructions
right, then I now have another problem

I amended my vhost section of my httpd.conf files to read.
<VirtualHost purehacker.com >
ServerAdmin root.TakeThisOut@purehacker.com
DocumentRoot /usr/local/www/html
ServerName purehacker.com
ServerAlias <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">www.purehacker.com</a>
ErrorLog /var/log/httpd-error_log
CustomLog /var/log/httpd-access_log common
</VirtualHost>


<VirtualHost * >
ServerAdmin angryphase.TakeThisOut@purehacker.com
DocumentRoot /usr/home/angryphase/public_html
ServerName angryphase.purehacker.com
ErrorLog /usr/home/angryphase/error_log
CustomLog /usr/home/angryphase/access_log common
</VirtualHost>

Now when I goto <a style='text-decoration: underline;' href="http://www.purehacker.com" target="_blank">www.purehacker.com</a> I get the test website the user is
using as a place holder for that domain.
However when I goto <a style='text-decoration: underline;' href="http://angryphase.purehacker.com" target="_blank">http://angryphase.purehacker.com</a> I also get the same
test website.

Maybe I havent understood what you actually ment.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
user2375

External


Since: Jul 16, 2003
Posts: 13



(Msg. 8) Posted: Wed Oct 22, 2003 8:34 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

In article <bn67q0$tjjtt$2@ID-204621.news.uni-berlin.de>,
Materialised <materialised.RemoveThis@privacy.net> wrote:

  > > NameVirtualHost *
  > >
  > > <VirtualHost *>
<font color=brown>   > > ServerName <a style='text-decoration: underline;' href="http://www.whatever...</font" target="_blank">www.whatever...</font</a>>
   > > ...other things as in your configuration...
  > > </VirtualHost>
  > >
  > > <VirtualHost *>
   > > ServerName angryphase.whatever...
   > > ...other things as in your configuration...
  > > </VirtualHost>
  > >
  > > Davide
 > Cool, that did the trick, thanks very much Smile
 >


looks like Davide explained this better than me Wink


patpro
--
je cherche un poste d'admin-sys Mac/UNIX
(ou une jeune et jolie femme riche)
<a style='text-decoration: underline;' href="http://patpro.net/cv.php" target="_blank">http://patpro.net/cv.php</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 9) Posted: Wed Oct 22, 2003 8:34 pm
Post subject: Re: Virtual Hosts [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

patpro <patpro.pouet RemoveThis @archange.fr> wrote:
 > looks like Davide explained this better than me Wink

feel free to quote me next time.
Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Virtual Hosts 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Virtual hosts and SSL? - Hello I'm trying to setup this apache 1.3 server for virtual hosts, with ssl. I've got the normal port 80 working, but the SSL is a bit of a mess. If I have the SSL pages in the real part of the server, ie, https://www.example.com/fred/index.htm then....

Virtual Hosts? - I'm wanting to use one IP address to host multiple domains, ie web hosting. I assume that "virtual hosts" are the thin I need to focus on here and is this basically a similar concept to Host Headers in IIS 5.0? I'm running Windows 2000 with Apa...

Virtual Hosts Problem - Hi Group, I'm having trouble getting Virtual Hosts to work on my Mandrake 9,1 box. I'm using the Advx release of Apache for Mandrake, and it switches between 1.3x and 2.0.x (currently 2.0.44) by executing one of two scripts. I've followed a lot of the..

Virtual Hosts question - I guess I need to know if this is even possible... I have one webserver running apache Virtual Hosts on three different ports. Everything works fine and I can go to each page by specifying the port in my browser (e.g. "http://domain.com:8080"...

Problemi con Virtual Hosts - Ho un problema con i Virtual host NameVirtualHost * <Virtual host *> ServerName www.thunder.tld DocumentRoot /www </VirtualHost> in /etc/hosts ho dichiarato 127.0.0.1 www.thunder.tld thunder Non mi accede alla pagina in /www xche? grazie...
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]