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

vhost in apache2

 
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  websphere application crashes when proxying to si..  
Author Message
email8

External


Since: Oct 14, 2003
Posts: 2



(Msg. 1) Posted: Tue Oct 14, 2003 4:43 pm
Post subject: vhost in apache2
Archived from groups: alt>apache>configuration (more info?)

Hi,
following is a total mess for me, I hope it's not for you !!

Environment : RH9 Apache2 (came with the distro)

I installed RH as a web server with everything suggested plus SSL. THe
firewall is set to medium security.

I want to configure the server to act exactly as a conventionnal web host so
I could learn to write efficient php scripts.

Obviously I don't have any qualified domain name. And obviously too the
scripts won't.

Now, how do I configure the whole thing (httpd, vhosts, DNS server ?? and so
on) so that I can type www.asite.com on the local browser ?

Actually the only way to open the sites is to enter
http://localhost:8080/sitedir/www/ (yeah apache listens to port 8080)

I tried to configure the whole thing with the apache configuration facility
provided with RH9 but nothing works.

Document root is var/www/http/ under which all sites will be, so
var/www/http/asite/www/
var/www/http/anothersite/www/

One more thing, in the doc they say that if I plan to use SSL, vhosts must
not be configured as name based vhosts but IP based vhosts.

Thanks

 >> Stay informed about: vhost in apache2 
Back to top
Login to vote
davideyeahsure

External


Since: Nov 03, 2003
Posts: 2907



(Msg. 2) Posted: Tue Oct 14, 2003 9:15 pm
Post subject: Re: vhost in apache2 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

 > Now, how do I configure the whole thing (httpd, vhosts, DNS server ?? and so
 > on) so that I can type <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> on the local browser ?

Three steps:
1. have <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> resolved on your local machine, for this just
add 127.0.0.1 <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> to your /etc/hosts file, no need
to fuck around with a DNS server for that.

2. configure the Virtual Hosts in httpd.conf:
  NameVirtualHost *
  <VirtualHost *>
<font color=green>   ServerName <a style='text-decoration: underline;' href="http://www.asite.com</font" target="_blank">www.asite.com</font</a>>
   DocumentRoot /where/the/hell/you/want/it
  </VirtualHost>

3. restart httpd and check out.

ping <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> should ping your own machine (127.0.0.1) and
the browser should show the correct page.

Davide<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: vhost in apache2 
Back to top
Login to vote
email8

External


Since: Oct 14, 2003
Posts: 2



(Msg. 3) Posted: Wed Oct 15, 2003 3:19 pm
Post subject: Re: vhost in apache2 [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi Davide

Tanks a lot for your help.

My config files were all perfect. I use both IP and name alongside in the
vhosts definitions so that the server could not be attacked by DOS scripts.
The problem I had was that absolutely no site but the real ones on the web
could display in the browser. I would only obtain a blank screen with no
message at all.

I've found the problem.

I told before I was using SSL. Well this was the "problem". Instead of
typing <a style='text-decoration: underline;' href="http://www.somesite.com" target="_blank">www.somesite.com</a> I should have typed <a style='text-decoration: underline;' href="https://bla.bla.bla" target="_blank">https://bla.bla.bla</a> what I did
further and gained access (passing through several security warnings) to the
local sites .


Again, thanks for your help.

"Davide Bianchi" <davideyeahsure.DeleteThis@onlyforfun.net> a écrit dans le message de
news:bmhefn$ln1v5$1@ID-18487.news.uni-berlin.de...
  > > Now, how do I configure the whole thing (httpd, vhosts, DNS server ??
and so
  > > on) so that I can type <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> on the local browser ?
 >
 > Three steps:
 > 1. have <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> resolved on your local machine, for this just
 > add 127.0.0.1 <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> to your /etc/hosts file, no need
 > to fuck around with a DNS server for that.
 >
 > 2. configure the Virtual Hosts in httpd.conf:
 > NameVirtualHost *
 > <VirtualHost *>
<font color=purple> > ServerName <a style='text-decoration: underline;' href="http://www.asite.com</font" target="_blank">www.asite.com</font</a>>
 > DocumentRoot /where/the/hell/you/want/it
 > </VirtualHost>
 >
 > 3. restart httpd and check out.
 >
 > ping <a style='text-decoration: underline;' href="http://www.asite.com" target="_blank">www.asite.com</a> should ping your own machine (127.0.0.1) and
 > the browser should show the correct page.
 >
 > Davide<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: vhost in apache2 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
CGI vhost - Greetings, I am trying to set up a vhost that will automatically execute a cgi binary and I'm not too sure how to go about it. If I go to the address and add /cgi-bin/<file_name> it works fine, so I know cgi is configured correctly. Also my name...

Proxy Only VHost - Is it possible to setup a proxy only virtualhost? As in no reponse if the request is not a proxy request from a host in the 'ACL'. Thanks

Mystery vhost - The hosting provider set up the initial IP host name headers, but there is no vhosts file associated with it! I am completely puzzled where this was configured... it's not in any of the apache conf files. Where might this be? I'm trying to set up my...

vhost settings? - hallo i installed a wampp2 that is a apache2.0.x php gdlib etc package. now i am trying to set up a vhost with my unique domain at the moment. i have a static ip and a registred domain. the only thing for me is to change the httpd.conf as far as i..

Apache VHost config with MySQL... possible? - Morning all, I've done some searching on google and other places and found nothing that seems to fit the bill. I'd like (if possible of course) to try and work Apache VHost configs with either MySQL or a flatfile "map" type system. Has anyone ...
   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 ]