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

All virtual sites point to default . . .

 
Goto page Previous  1, 2
   Web Hosting and Web Master Forums (Home) -> Apache RSS
Next:  Godaddy and SQL Server 2005 Express Edition?  
Author Message
shimmyshack

External


Since: Dec 08, 2006
Posts: 274



(Msg. 16) Posted: Mon Mar 26, 2007 8:41 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: alt>apache>configuration (more info?)

On 26 Mar, 16:36, "Joe Befumo" <j... DeleteThis @nospam.befumo.com> wrote:
> Okay, at this point I can enter:
>
> http://www.befumo.com/hello.html
>
> and I get the page, so that seems to be a step in the right direction,
> however,
>
> http://www.befumo.com/index.htm
>
> (which I know exists)
>
> gives me a "Page not found:, and
>
> http://www.befumo.com
>
> still gives me the Apache default page.
>
> Feels like I'm getting closer, though.

the 403 forbidden is just becuase it doesnt search for the index file,
and IndexOptions is set to not allow indexing, so all is well there.

 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 17) Posted: Mon Mar 26, 2007 9:04 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I went and changed the owner of the directories to "Apache", but that
doesn't seem to have changed anything.

From the below, I'm guessing that it's showing the Test Page because
something is forbidden in the directories? I have no clue what else to look
for.

Thanks again.

Joe


> This is what I get, also the same when using telnet
>
> #moofus>get -Sxe http://www.befumo.com/
> LWP::UserAgent::new: ()
> LWP::UserAgent::request: ()
> LWP::UserAgent::send_request: GET http://www.befumo.com/
> LWP::UserAgent::_need_proxy: Not proxied
> LWP::Protocol::http::request: ()
> LWP::Protocol::collect: read 1428 bytes
> LWP::Protocol::collect: read 1428 bytes
> LWP::Protocol::collect: read 1129 bytes
> LWP::UserAgent::request: Simple response: Forbidden
> GET http://www.befumo.com/ --> 403 Forbidden
> Connection: close
> Date: Mon, 26 Mar 2007 13:55:04 GMT
> Accept-Ranges: bytes
> ETag: "4b80a8-f91-3e0aa1c0"
> Server: Apache/2.0.52 (Red Hat)
> Content-Length: 3985
> Content-Type: text/html; charset=ISO-8859-1
> Content-Type: text/html; charset=UTF-8
> Last-Modified: Tue, 30 Nov 2004 16:25:51 GMT
> Client-Date: Mon, 26 Mar 2007 12:54:48 GMT
> Client-Peer: 63.163.109.231:80
> Client-Response-Num: 1
> Title: Test Page for the Apache HTTP Server on Red Hat Enterprise
> Linux
> ...
>
> hope that helps
>

 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 18) Posted: Mon Mar 26, 2007 9:33 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

got it, thanks.

I'll see if that makes any light bulbs flash.

Joe



"shimmyshack" <matt.farey DeleteThis @gmail.com> wrote in message
news:1174915116.614014.164610@b75g2000hsg.googlegroups.com...
> On 26 Mar, 14:04, "Joe Befumo" <j... DeleteThis @nospam.befumo.com> wrote:
>> I went and changed the owner of the directories to "Apache", but that
>> doesn't seem to have changed anything.
>>
>> From the below, I'm guessing that it's showing the Test Page because
>> something is forbidden in the directories? I have no clue what else to
>> look
>> for.
>>
>> Thanks again.
>>
>> Joe
>>
>> > This is what I get, also the same when using telnet
>>
>> > #moofus>get -Sxehttp://www.befumo.com/
>> > LWP::UserAgent::new: ()
>> > LWP::UserAgent::request: ()
>> > LWP::UserAgent::send_request: GEThttp://www.befumo.com/
>> > LWP::UserAgent::_need_proxy: Not proxied
>> > LWP::Protocol::http::request: ()
>> > LWP::Protocol::collect: read 1428 bytes
>> > LWP::Protocol::collect: read 1428 bytes
>> > LWP::Protocol::collect: read 1129 bytes
>> > LWP::UserAgent::request: Simple response: Forbidden
>> > GEThttp://www.befumo.com/--> 403 Forbidden
>> > Connection: close
>> > Date: Mon, 26 Mar 2007 13:55:04 GMT
>> > Accept-Ranges: bytes
>> > ETag: "4b80a8-f91-3e0aa1c0"
>> > Server: Apache/2.0.52 (Red Hat)
>> > Content-Length: 3985
>> > Content-Type: text/html; charset=ISO-8859-1
>> > Content-Type: text/html; charset=UTF-8
>> > Last-Modified: Tue, 30 Nov 2004 16:25:51 GMT
>> > Client-Date: Mon, 26 Mar 2007 12:54:48 GMT
>> > Client-Peer: 63.163.109.231:80
>> > Client-Response-Num: 1
>> > Title: Test Page for the Apache HTTP Server on Red Hat Enterprise
>> > Linux
>> > ...
>>
>> > hope that helps
>
> whoops:
> http://docs.fedoraproject.org/selinux-apache-fc3/sn-simple-setup.html
>
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 19) Posted: Mon Mar 26, 2007 10:32 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> do you have SELinux enabled in your install,
>
> ls --context
>
> which could be your problem.

-rw-r--r-- root root user_u:object_r:user_home_t
anaconda-ks.cfg
-rw-r--r-- root root root:object_r:user_home_t context.txt
drwxr-xr-x root root root:object_r:user_home_t Desktop
-rw-r--r-- root root user_u:object_r:file_t install.log
-rw-r--r-- root root user_u:object_r:file_t
install.log.syslog
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 20) Posted: Mon Mar 26, 2007 10:33 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

> do you have SELinux enabled in your install,
>
Not sure what this is . . .
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 21) Posted: Mon Mar 26, 2007 11:15 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I Ran



chcon -R -h -t httpd_sys_content_t /var/www/html/



Now when I do an ls -aZ /var/www/html/befumo/index.htm



(or other files in those directories), I get the following:



-rwxr--r-- jbefumo jbefumo root:object_r:httpd_sys_content_t
/var/www/html/befumo/index.htm



Which I assume is what it's supposed to be.



NOW, if I go to the browser and enter:



http://localhost/befumo/index.htm



I see the correct page.



But it's still not showing up in a browser when I enter the URL.



Most perplexing.



"shimmyshack" <matt.farey.RemoveThis@gmail.com> wrote in message
news:1174920735.317519.7510@n59g2000hsh.googlegroups.com...
> On 26 Mar, 15:33, "Joe Befumo" <j....RemoveThis@nospam.befumo.com> wrote:
>> > do you have SELinux enabled in your install,
>>
>> Not sure what this is . . .
>
> looks like you do, try it for /var/www/html/ and /var/www/
> basically you have a security enabled linux now, which sets strict
> policies for what app can access which file folder etc... the policies
> for daemons and servers and so on are all designed to keep these apps
> from overstepping their bounds when asked to do so by a malicious
> person.
> What I would do first is create a test file in the default doc root,
> as the URL above suggests and see if you can see that via a browser,

Did that -- it works

> dont worry about vhosts for now.
>
> You might need to adjust the perms but shouldnt think so at this
> point, then if you can see this, and now want to create oother doc
> roots for each vhost, then you will have to set the perms so that
> apache can read and serve those files, your vhost sections seems ok.
> As I say I dont know the exact commands, but googling for apache
> config red hat 4 selinux should throw up some howtos.
> sorry not to be more forthcoming, I have myself strayed away from
> selinux because I use so many other apps in conjunction with the
> server, that it becomes a nightmare to admin. (IMHO - as a beginner
> myself)
>
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 22) Posted: Mon Mar 26, 2007 11:29 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 23) Posted: Mon Mar 26, 2007 11:36 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Okay, at this point I can enter:

http://www.befumo.com/hello.html

and I get the page, so that seems to be a step in the right direction,
however,

http://www.befumo.com/index.htm

(which I know exists)

gives me a "Page not found:, and

http://www.befumo.com

still gives me the Apache default page.

Feels like I'm getting closer, though.
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 24) Posted: Mon Mar 26, 2007 1:00 pm
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Ah ha!

I put an index.html file in

/var/www/html/

Now it shows up as the default for all of my websites, which suggests that,
for some reason, the directories defined in the virtualserver sections
aren't being used.

(try, for example, going to any of the following URLs:)

http://www.befumo.com
http://www.rotwerx.com
http://rob.befumo.com
http://www.pleasantmountpress.com

Which is suggesting to me that now the problem is in httpd.conf, somewhere,
dontcha think?

Joe
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 25) Posted: Mon Mar 26, 2007 1:38 pm
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

btw -- I did try putting a DirectoryIndex index.htm directive in the
httpd.config file.

"Joe Befumo" <joe.RemoveThis@nospam.befumo.com> wrote in message
news:130fv2g27pg5fd7@corp.supernews.com...
> Ah ha!
>
> I put an index.html file in
>
> /var/www/html/
>
> Now it shows up as the default for all of my websites, which suggests
> that, for some reason, the directories defined in the virtualserver
> sections aren't being used.
>
> (try, for example, going to any of the following URLs:)
>
> http://www.befumo.com
> http://www.rotwerx.com
> http://rob.befumo.com
> http://www.pleasantmountpress.com
>
> Which is suggesting to me that now the problem is in httpd.conf,
> somewhere, dontcha think?
>
> Joe
>
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
shimmyshack

External


Since: Dec 08, 2006
Posts: 274



(Msg. 26) Posted: Mon Mar 26, 2007 2:13 pm
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mar 26, 6:38 pm, "Joe Befumo" <j....DeleteThis@nospam.befumo.com> wrote:
> btw -- I did try putting a DirectoryIndex index.htm directive in the
> httpd.config file.
>
> "Joe Befumo" <j....DeleteThis@nospam.befumo.com> wrote in message
>
> news:130fv2g27pg5fd7@corp.supernews.com...
>
> > Ah ha!
>
> > I put an index.html file in
>
> > /var/www/html/
>
> > Now it shows up as the default for all of my websites, which suggests
> > that, for some reason, the directories defined in the virtualserver
> > sections aren't being used.
>
> > (try, for example, going to any of the following URLs:)
>
> >http://www.befumo.com
> >http://www.rotwerx.com
> >http://rob.befumo.com
> >http://www.pleasantmountpress.com
>
> > Which is suggesting to me that now the problem is in httpd.conf,
> > somewhere, dontcha think?
>
> > Joe

yeah, that's what i think,
somewhere you already have a DirectoryIndex directive, which is why
the other one didnt work (if you added it in the main conf file - I'm
not sure you can have multiple ones)
yes at the moment the vhosts arent being used, Im not sure how selinux
affects this, I wonder if the apache process can even see them until
it is explicitly allowed by you. Are you adding the vhosts into the
main conf or in a separate vhost conf file - which will then need to
be included within the main conf?
So the steps are:
tell selinux to allow http process access to the vhost directories you
have setup,
ensure the vhost conf is being loaded by the server,
populate these locations with index.html (unless you append to the end
of the existing DirectoryIndex command the file index.htm in the case
where you already have files from previous sites which you need to be
named index,htm) It is a good idea to have DirectoryIndex search for
index.htm index.html index.php and so on, whatever you think you will
need.

I will probably enable SELinux myself sometime, but it's always the
case with me, I get everything just so, and it takes me a while to
pluck up courage to begin the next cycle of iterative setup hassles!!
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 27) Posted: Mon Mar 26, 2007 3:08 pm
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

First, thanks to everyone who helped me get to this point

To recap, here's where things stand now:

In a nutshell, I have 4 sites, and as of right now, they all are defaulting
to a test index.html file in /car/www/html/, rather than in the individual
directories indicated by the DocumentRoot parameter in each VirtualHost
block.

If I enter, say, http://localhost/befumo/index.htm, I will see the
appropriate start page, however, if I enter:

http://www.befumo.com/index.htm, I get a page not found error.

If I enter http://www.befumo.com/hello.htm, howevver, I see the appropriate
hello.htm file from /var/www/html/befumo/

If I explicitly enter any of the other pages in that directory, I get a Page
Not Found error.

I Ran

chcon -R -h -t httpd_sys_content_t /var/www/html/

When I do an ls -aZ /var/www/html/befumo/

I get the following:

-rw-r--r-- root root root:object_r:httpd_sys_content_t hello.html
-rw-r--r-- root root root:object_r:httpd_sys_content_t index.htm
....

Which I assume is what it's supposed to be.

Note that hello.html and index.htm seem to have the same configuration, but
one displays, and the other will not.


ls -Z in /var/www/html shows the following:
drwxr-xr-x apache apache root:object_r:httpd_sys_content_t befumo
-rw-r--r-- root root root:object_r:httpd_sys_content_t hello.html
drwxr-xr-x apache apache root:object_r:httpd_sys_content_t
pleasantmountpress
drwxrwxrwt apache apache root:object_r:httpd_sys_content_t rbefumo
drwxr-xr-x apache apache root:object_r:httpd_sys_content_t rootwerx



Here's an excerpt from my httpd.conf file:


#
# Use name-based virtual hosting.
#
NameVirtualHost 63.163.109.231:80


#
# Virtual hosts
#

# Virtual host www.befumo.com
<VirtualHost 63.163.109.231:80>
DocumentRoot /var/www/html/befumo/
ServerAdmin webmaster RemoveThis @befumo.com
ServerName www.befumo.com
ServerAlias befumo.com www.befumo.com
DirectoryIndex index.htm
</VirtualHost>
....

I'm baffled.
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
shimmyshack

External


Since: Dec 08, 2006
Posts: 274



(Msg. 28) Posted: Tue Mar 27, 2007 7:29 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On 27 Mar, 14:38, "Joe Befumo" <j....RemoveThis@nospam.befumo.com> wrote:
> Thought I had it there for a minute -- discovered and comented out
> DirectoryIndex and DirectoryRoot directives from the main body of the
> httpd.conf, but to no avail. No change.
>
> I wonder now whether maybe it's loading some subordinate file that has these
> directives?
>
> > tell selinux to allow http process access to the vhost directories you
> > have setup,
>
> How is this done?
>
> > ensure the vhost conf is being loaded by the server,
>
> I'm defining these in the main body of httpd.conf, but will investigate.
>
> > I will probably enable SELinux myself sometime, but it's always the
> > case with me, I get everything just so, and it takes me a while to
> > pluck up courage to begin the next cycle of iterative setup hassles!!
>
> I may yet roll back to a simpler build.
>
> Joe

Joe as I say, I'm not the right guy to debug past this point as to me
you are doing everything right. You have permissions which seem ok.
You have set up your vhosts ok.
I do find it interesting that your vhosts are bound to
63.163.109.231:80 (I cant remember whether you are on the same LAN as
the server or whether it is out there on the net away from your
location, for now you could try NameVir... *:80 with the vhosts *:80
as well what IP is your main conf listening on it defaults to Listen *:
80 which is ok)
It's odd that none of the settings are being taken from there, does
this OS enforce some kind of structure, such as you have to use a per
site conf
var/www/vhosts/domain.com/conf/vhost.conf

because you making all the changes in the main conf file you arent
suffering from using the wrong line endings or saving with BOM
otherwise the server wouldnt start.
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 29) Posted: Tue Mar 27, 2007 9:38 am
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thought I had it there for a minute -- discovered and comented out
DirectoryIndex and DirectoryRoot directives from the main body of the
httpd.conf, but to no avail. No change.

I wonder now whether maybe it's loading some subordinate file that has these
directives?

> tell selinux to allow http process access to the vhost directories you
> have setup,

How is this done?


> ensure the vhost conf is being loaded by the server,
I'm defining these in the main body of httpd.conf, but will investigate.


> I will probably enable SELinux myself sometime, but it's always the
> case with me, I get everything just so, and it takes me a while to
> pluck up courage to begin the next cycle of iterative setup hassles!!
>

I may yet roll back to a simpler build.

Joe
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Joe Befumo

External


Since: Mar 25, 2007
Posts: 17



(Msg. 30) Posted: Tue Mar 27, 2007 8:12 pm
Post subject: Re: All virtual sites point to default . . . [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

I'm taking the big hammer approach and installing Fedora Core 5 instead.
See if that works any better ;^)

Joe


"shimmyshack" <matt.farey RemoveThis @gmail.com> wrote in message
news:1175005748.835157.99160@e65g2000hsc.googlegroups.com...
> On 27 Mar, 14:38, "Joe Befumo" <j... RemoveThis @nospam.befumo.com> wrote:
>> Thought I had it there for a minute -- discovered and comented out
>> DirectoryIndex and DirectoryRoot directives from the main body of the
>> httpd.conf, but to no avail. No change.
>>
>> I wonder now whether maybe it's loading some subordinate file that has
>> these
>> directives?
>>
>> > tell selinux to allow http process access to the vhost directories you
>> > have setup,
>>
>> How is this done?
>>
>> > ensure the vhost conf is being loaded by the server,
>>
>> I'm defining these in the main body of httpd.conf, but will investigate.
>>
>> > I will probably enable SELinux myself sometime, but it's always the
>> > case with me, I get everything just so, and it takes me a while to
>> > pluck up courage to begin the next cycle of iterative setup hassles!!
>>
>> I may yet roll back to a simpler build.
>>
>> Joe
>
> Joe as I say, I'm not the right guy to debug past this point as to me
> you are doing everything right. You have permissions which seem ok.
> You have set up your vhosts ok.
> I do find it interesting that your vhosts are bound to
> 63.163.109.231:80 (I cant remember whether you are on the same LAN as
> the server or whether it is out there on the net away from your
> location, for now you could try NameVir... *:80 with the vhosts *:80
> as well what IP is your main conf listening on it defaults to Listen *:
> 80 which is ok)
> It's odd that none of the settings are being taken from there, does
> this OS enforce some kind of structure, such as you have to use a per
> site conf
> var/www/vhosts/domain.com/conf/vhost.conf
>
> because you making all the changes in the main conf file you arent
> suffering from using the wrong line endings or saving with BOM
> otherwise the server wouldnt start.
>
>
 >> Stay informed about: All virtual sites point to default . . . 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
Virtual hosts: 2 Domains that point to the same directory - Hi there I created two virtual hosts that have the same directory as the DocumentRoot: <VirtualHost *> DocumentRoot /web/html ServerName a.com </VirtualHost> <VirtualHost *> DocumentRoot /web/html Serve...

Default/Virtual server ? - I am new to apache 2.0.40 running on Linux and although I have it working I am unsure what is the best way configure 2 IP based hosts. Example configurations: 1. One IP as default server, one as virtual or 2. One IP as virtual, 2nd IP as virtual, wit...

default directory in virtual hosts? - Hi, can i make an entry for a default Server in name based virtual hosts what will be used when no entry is found for the give domainname? For Apache 1.3.x !

how can I define default virtual host using IP in url ? - I'm using apache 1.3 with several virtual host. Each host has a DNS record from dyndns like foo.com, elsa.org, example.edu,... and they have all the same IP adresse (24.50.24.50 for example). Using url http://foo.com I can correctly access to foo.com..

Virtual sites + certificate [newbie] - Hello, I wonder if there is some way in having on the *same* IP multiple virtual websites www.domain.name, www.domain2.name and so on having each of them their corresponding SSL certificate for https access on same standard server port 443. If I do....
   Web Hosting and Web Master Forums (Home) -> Apache All times are: Pacific Time (US & Canada) (change)
Goto page Previous  1, 2
Page 2 of 2

 
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 ]