Re: Apache & VirtualHosts
From: R.Gunn (rgunn_at_stephenaustinNOSPAM.co.uk)
Date: 07/21/03
- Next message: news_at_roaima.freeserve.co.uk: "Re: how to use "find" command?"
- Previous message: Cory Poore: "Can you run Ximian on FreeBSD"
- In reply to: Jim Fischer: "Re: Apache & VirtualHosts"
- Next in thread: Maurits van de Kamp: "Re: Apache & VirtualHosts"
- Reply: Maurits van de Kamp: "Re: Apache & VirtualHosts"
- Reply: Jim Fischer: "Re: Apache & VirtualHosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 21 Jul 2003 08:52:38 +0000 (UTC)
Hi.
I don't think I made myself very clear on this...:
"Jim Fischer" <jfischer_link5809@now.here.com> wrote in message
news:UMTRa.25$mo4.3@fe01.atl2.webusenet.com...
> R.Gunn wrote:
> > I am having teething problems with Apache2.0 running on RH9:
> >
> > I can see the "Apache configuration error" page (error 404 replacement)
when
> > I hit the server but cannot get it to view pages I put into
/var/www/html.
> >
> > I saw a reference to an "apache" user and group - do I need to create
these
> > first?
>
> If you're running Apache on a Red Hat Linux box, then the 'httpd' RPM
> creates a user named 'apache' and a group named 'apache' when the RPM is
> installed. Once installed, Apache (i.e., the 'httpd' daemon) runs with a
> UID.GID of "apache.apache".
I have since found this user and group (there was a check box which filtered
them out)
>
>
> > How do I then grant access rights only to the /var/www/html folder
> > (or do I have to give it more rights than that).
>
> Again, this configuration step is handled when the httpd RPM is
> installed. Specifically, the '/var/www/html/' directory tree is created,
> and the Apache config file '/etc/httpd/conf/httpd.conf' is installed,
> etc. Note that 'httpd.conf' is more-or-less ready to use right out of
> the box -- i.e., you can just start the 'httpd' daemon,
>
> [root]# service httpd start
>
> and then, assuming the startup goes smoothly, start serving web pages
> out of /var/www/html.
>
service is indeed running (thanks for the command line method of starting
the service - I was wondering how to do that. I assume stop / restart work
too; but thats not the issue here!
>
> > I have also setup 4 virtual hosts using dyndns.com and have used the GUI
> > configurator for apache to include these. To start with all of them
showed
> > the same 404 replacement file. Now when I try I get an error saying
pages
> > are secure and to use https:// to access them rather than http://. Is
this
> > because they are running on port 81 rather than 80?
>
> No. [The 'https' service listens on port 443 (see '/etc/services').]
>
I understand that https listens on port 443....
>
> > (reason being I am
> > accessing from outside using a router and the company website is already
> > running on a separate webserver on port 80!). I dont recall what I did
> > before this happened so any advice here would also be great - or is it
> > because its port 81 and not 80?!
> >
> > Error page:
> > -----starts-----
> > Bad Request
> > Your browser sent a request that this server could not understand.
> > Reason: You're speaking plain HTTP to an SSL-enabled server port.
> > Instead use the HTTPS scheme to access this URL, please.
> >
> >
> > Hint: https://rgunn.shacknet.nu:81/
>
> If your web server is listening on port 81 instead of 80, then you need
> to explicitly tell your web browser software (e.g., Mozilla) to make
> HTTP connection requests via port 81 on your web server instead of the
> default port 80:
>
> http://dyndns.com:81/
>
If I do http://shrike:81 I get the "bad request" page above telling me to
use https://shrike:81 - which is very confusing as https:// should be port
443 surely. If I then do visit https://shrike:81 I do get my "root" html
index page I created.
If I switch OFF all my "named virtual host" I no longer get forced to use
https:// and can then use http:// as normal (all port 81 still).
I can visit http://shrike:81/shacknet to get the index page that should be
displayed when visiting http://rgunn.shacknet.nu:81 with no problem - but
cannot visit it from the "outside" (dyndns supplied) address.
If you don't mind, I have screenshots of the various configuration screens
and resulting browser windows I could private mail to you..?
To summarise, I think, WITHOUT name based virtual hosts running I can visit
my default home page at http://shrike:81 with no problem. Switching on
name-based virtual hosts forces me to use https://shrike:81 to view my
default home page; and none of the virtual hosts work either.
For testing purposes (although I have tried without the hosts file and doing
it "online"), I have made the following modification to my HOSTS file (to
save me dialling up to test the external addresses all the time):
192.168.0.5 doesthis.serveftp.net
192.168.0.5 gunns.homelinux.net
192.168.0.5 rgunn.shacknet.nu
Many thanks
Richard
> --
> Jim
>
> To reply by email, remove "link" and change "now.here" to "yahoo"
> jfischer_link5809{at}now.here.com
>
>
- Next message: news_at_roaima.freeserve.co.uk: "Re: how to use "find" command?"
- Previous message: Cory Poore: "Can you run Ximian on FreeBSD"
- In reply to: Jim Fischer: "Re: Apache & VirtualHosts"
- Next in thread: Maurits van de Kamp: "Re: Apache & VirtualHosts"
- Reply: Maurits van de Kamp: "Re: Apache & VirtualHosts"
- Reply: Jim Fischer: "Re: Apache & VirtualHosts"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|