[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-users
Subject:    RE: [users@httpd] URGENT Attention Problem
From:       "kernel.2k5" <kernel.2k5 () gmail ! com>
Date:       2008-01-31 16:35:28
Message-ID: 47A1F600.30705 () gmail ! com
[Download RAW message or body]

Hi , Thanks for valuable help , kindly check my answers to yours
questions as below:

> -----Original Message-----
> From: kernel.2k5 [mailto:kernel.2k5@gmail.com] 
> Sent: Wednesday, January 30, 2008 7:28 PM
> To: users@httpd.apache.org
> Subject: Re: [users@httpd] URGENT Attention Problem
> 
> 
> HI All , Now I tried with this new Code . but nothings works as , Now
> Its really needs to work as we all predict.
> have a look
> 
> ---------------------------------------------httpd.conf-----------
> Listen 0.0.0.0:80
> 
> ServerName localhost:80
> 
> NameVirtualHost 127.0.0.1:80
> NameVirtualHost 210.18.170.226:80
> 
> <VirtualHost 127.0.0.1:80>
> 
> DocumentRoot /var/www/html/site1
> ServerName site1.com
> ServerAlias www.site1.com
> 
> </VirtualHost>
> 
> <VirtualHost 127.0.0.1:80>
> 
> DocumentRoot /var/www/html/site2
> ServerName site2.com
> ServerAlias www.site2.com
> Alias /about /var/www/html/site2/about/index.html
> Alias /feedback /var/www/html/site2/feedback.html

These Alias directives are completely pointless. You have defined the
DocumentRoot as "/var/www/html/site2", so a request for
http://site2.com/ will map to /var/www/html/site2 and
http://site2.com/about will map to /var/www/html/site2/about and so on.
So there is no need for all the Aliases. You just need to set:

DirectoryIndex index.html feedback.html

-------------------------------------

Yes i did and Now this issues is sorted, I am thankful to you.

----------------------------------------
to get those files picked up by default (see
http://httpd.apache.org/docs/2.2/mod/mod_dir.html#directoryindex for
details)

BTW, if you are trying to prevent that the user ever sees a ".html" file
(ie, so that the browser always shows  http://site2.com/about  etc) then
you are re-inventing the web and giving yourself a lot of work for a
pointless cosmetic effect...

------------------------
> 
> </VirtualHost>
> 
> <VirtualHost 210.18.170.226:80>
> 
> DocumentRoot /var/www/html/site4
> ServerName livetekindia.com
> ServerAlias www.livetekindia.com
> Alias /about /var/www/html/site4/about/index.html
> Alias /feedback /var/www/html/site4/feedback.html
> Alias /useme /var/www/html/site4/index2.html
> Alias /cp1 /var/www/html/site4/index3.html
> Alias /foo /var/www/html/site4/foo.php
> 
> </VirtualHost>
> 
> ---------------------------------------httpd.conf Ends---------------
> 
> 
> Now when i try in FireFox
> 
> http://site1.com ----------It works
> 
> http://site2.com ----------It works
> 
> http://site2.com/about  ----------It wont redirect to page
> /about/index.html  means it wont works

Please use accurate terminology. "Redirect" means the server sends a new
URL back to the clinet and then the client makes a new request. You are
not doing this, you are "aliasing", which means that the server goes to
a different filesystem location to get the file, without telling the
client about it.
-------------------------------------------------------------
Yes ,fine its not redirect , i used wrong word , but when i used like a
shown below

Alias /useme /var/www/html/site4/index2.html
Alias /cp1 /var/www/html/site4/index3.html

, so you mean to say do need to have /useme directory some where in my
file system or say inside /var/www/html inside some where ???Kindly tell
me as i dont have any directory like /useme and /cp1 ,
i want when any user access like this

http://210.18.170.226/useme

then it must open /var/www/html/site4/index2.html this file ,

and that servername is not registered as i am trying all this one single
machine directly connected to internet with that public ip from ISP .so
now i got the point that i can not achieve livetekindia.com but at least
with IP it must work ,,Right ??????





Do you get a 404? What *exactly* does it say in the error log? Is the
file really there? You have made several typos in your posts and I
suspect you could easily have a typing  error in the path in your config
file. Please check it carefully for spelling and case.

> 
> It gives me a message like -------------
> 
> "The document you requested was not found. May we suggest our 
> home page
> <http://site2.com/?dl=1>?"
>  same for /feedback too.
> 
> Now then i tried
> 
> http://livetekindia.com  --------Nothings works and it opens 
> search.com .
> http://livetekindia.com/about  --------Nothings works.
> http://livetekindia.com/foo  --------Nothings works .

This domain is not in DNS. This cannot work on the public internet. Have
you registered this domain?

--------------------------
No you are right , i explained above .
-------------------------

> 
> but when i tried
> 
> http://210.18.170.226  -------- it works and open the default 
> index page .
> http://210.18.170.226/about  -------- it works and open the default
> index page .
> http://210.18.170.226/feedback  -------- it works and open the default
> feedback.html page .
> http://210.18.170.226/foo   -------- it works and open the default
> foo.php page .
> http://210.18.170.226/useme and cp1   -------- it wont works and give
> the error Object not found 404.

What is exact message in error log? See notes above - cross-check paths
in config with actual paths on file-system. Check spelling and case.
---------------------------
Yes Now i feel that i must go and strike head against wall , i found in
log file not found and when i checked its index2.htm not index2.html so
i corrected in httpd.conf and all works fine.

I am thankfull to you and all who read my such long mail and help me .

Once again Thanks to all of you . Guyz you Rocks.

----------------------------------


Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored.

> 
> I am confused ,what apache want me to do .Or i am making any 
> mistakes Now .
> 
> Plz help me .
> 
> Thanks to all of you !!!!
> 
> 
> 
> 
> Krist van Besien wrote:
> > On Jan 30, 2008 1:24 PM, kernel.2k5 <kernel.2k5@gmail.com> wrote:
> >
> >   
> >> if i type in URL ....
> >>
> >> *http://192.168.10.2/fotostick/about *
> >>
> >> then it must open the Alias of its that is index.php page 
> but its not
> >> working
> >>     
> >
> > You are not telling the server which of the two virtual 
> hosts you want
> > the content to come from. In that case the server passes 
> your request
> > to the first virtual host, which might not be what you want.
> >
> > Name based virtual hosts work only when you access a webserver using
> > it's _name_. Try requesting
> > http://www.livetekindia12.com/fotostick/about. Don.t use IP 
> adresses.
> >
> > Secondly, you have an alias "/about". this will not be used when you
> > try accessing "/fotostick/about". Try accessing
> > http://www.livetekindia12.com/about
> >
> > If you want "/fotostick/about" to be aliased somewhere you will need
> > to add a line like this:
> > Alias /fotostick/about /var/www/html/fotostick/index.php
> >
> > Krist
> >
> >   
> 
> -- 
> =======================================================
> With Best Regards
> 
> Mr.Shailesh Bhutada
> =======================================================
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP 
> Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>


This message is for the named person's use only. It may contain
confidential, proprietary or legally privileged information. If you
receive this message in error, please notify the sender urgently and
then immediately delete the message and any copies of it from your
system. Please also immediately destroy any hardcopies of the message.
The sender's company reserves the right to monitor all e-mail
communications through their networks.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic