You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Prasanna Mulgaonkar <pr...@gmail.com> on 2012/03/17 01:17:57 UTC

[users@httpd] Different pages served depending on IP address or domain addressing

Have a strange setup behavior that I have not been able to find an 
answer to.

I have a server running Apache set up at IP address 50.X.Y.Z

I have www.mydomain.com redirected from our domain hoster to that ip 
address.


At the top level of that apache stack (/var/www/html), i have an 
index.html file that serves up correctly whether I enter 
http://www.mydomain.com or http://50.X.Y.Z into the browser address.

I have an application in a subdirectory below the html file in 
/var/www/html/app. If I say http://50.X.Y.Z/app/, the app serves up 
correctly. We have been doing that for may months now.

However, if I try http://www.mydomain.com/app/, I do not get the app–I 
get the same index.html file that is served as if the /app/ was not 
appended to the end of the mydomain.com. There are no errors or notices 
in the apache error file.


The httpd.conf file declares
ServerName www.mydomain.com:80
UseCanonicalName On

There are no vhosts set up.

What else should I look at to explain this odd behavior.

Thanks.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Different pages served depending on IP address or domain addressing

Posted by Anam Ali Khan <an...@yahoo.com>.
Create a separate vhost definition with same directive values as you configure in main server section.

Define vhost definition in httpd.conf file.

-Anam



________________________________
 From: Prasanna Mulgaonkar <pr...@gmail.com>
To: users@httpd.apache.org 
Sent: Sunday, 18 March 2012, 2:45
Subject: Re: [users@httpd] Different pages served depending on IP address or domain addressing
 

The ServerAlias directive is only applicable in the virtual host section. Do I need to add a vhost definition?

--p

On 03/17/2012 10:21 AM, Anam Ali Khan wrote: 
Try this!
>
>
>
>UseCanonicalName Off
>ServerAlias www.mydomain.com
>
>Remove :80 in ServerName directive
>
>
>Make sure DNS records are properly configure.
>
>
>-Anam
>
>
>________________________________
> From: Prasanna Mulgaonkar <pr...@gmail.com>
>To: users@httpd.apache.org 
>Sent: Saturday, 17 March 2012, 5:17
>Subject: [users@httpd] Different pages served depending on IP address or domain addressing
> 
>Have a strange setup behavior that I have not been able to
            find an answer to.
>
>I have a server running Apache set up at IP address 50.X.Y.Z
>
>I have www.mydomain.com redirected from our domain hoster to that ip address.
>
>
>At the top level of that apache stack (/var/www/html), i
            have an index.html file that serves up correctly whether I
            enter http://www.mydomain.com or http://50.X.Y.Z into the browser address.
>
>I have an application in a subdirectory below the html file
            in /var/www/html/app. If I say http://50.X.Y.Z/app/, the app serves up correctly. We have been doing that for may months now.
>
>However, if I try http://www.mydomain.com/app/, I do not get the app–I get the same index.html file that is served as if the /app/ was not appended to the end of the mydomain.com. There are no errors or notices in the apache error file.
>
>
>The httpd.conf file declares
>ServerName www.mydomain.com:80
>UseCanonicalName On
>
>There are no vhosts set up.
>
>What else should I look at to explain this odd behavior.
>
>Thanks.
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>For additional commands, e-mail: users-help@httpd.apache.org
>
>
>
>

Re: [users@httpd] Different pages served depending on IP address or domain addressing

Posted by Prasanna Mulgaonkar <pr...@gmail.com>.
The ServerAlias directive is only applicable in the virtual host 
section. Do I need to add a vhost definition?

--p

On 03/17/2012 10:21 AM, Anam Ali Khan wrote:
> Try this!
>
> UseCanonicalName Off
> ServerAlias www.mydomain.com
> Remove :80 in ServerName directive
>
> Make sure DNS records are properly configure.
>
> -Anam
> ------------------------------------------------------------------------
> *From:* Prasanna Mulgaonkar <pr...@gmail.com>
> *To:* users@httpd.apache.org
> *Sent:* Saturday, 17 March 2012, 5:17
> *Subject:* [users@httpd] Different pages served depending on IP 
> address or domain addressing
>
> Have a strange setup behavior that I have not been able to find an 
> answer to.
>
> I have a server running Apache set up at IP address 50.X.Y.Z
>
> I have www.mydomain.com redirected from our domain hoster to that ip 
> address.
>
>
> At the top level of that apache stack (/var/www/html), i have an 
> index.html file that serves up correctly whether I enter 
> http://www.mydomain.com or http://50.X.Y.Z into the browser address.
>
> I have an application in a subdirectory below the html file in 
> /var/www/html/app. If I say http://50.X.Y.Z/app/, the app serves up 
> correctly. We have been doing that for may months now.
>
> However, if I try http://www.mydomain.com/app/, I do not get the app–I 
> get the same index.html file that is served as if the /app/ was not 
> appended to the end of the mydomain.com. There are no errors or 
> notices in the apache error file.
>
>
> The httpd.conf file declares
> ServerName www.mydomain.com:80
> UseCanonicalName On
>
> There are no vhosts set up.
>
> What else should I look at to explain this odd behavior.
>
> Thanks.
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org 
> <ma...@httpd.apache.org>
> For additional commands, e-mail: users-help@httpd.apache.org 
> <ma...@httpd.apache.org>
>
>
>

Re: [users@httpd] Different pages served depending on IP address or domain addressing

Posted by Anam Ali Khan <an...@yahoo.com>.
Try this!


UseCanonicalName Off
ServerAlias www.mydomain.com

Remove :80 in ServerName directive

Make sure DNS records are properly configure.

-Anam


________________________________
 From: Prasanna Mulgaonkar <pr...@gmail.com>
To: users@httpd.apache.org 
Sent: Saturday, 17 March 2012, 5:17
Subject: [users@httpd] Different pages served depending on IP address or domain addressing
 
Have a strange setup behavior that I have not been able to find an answer to.

I have a server running Apache set up at IP address 50.X.Y.Z

I have www.mydomain.com redirected from our domain hoster to that ip address.


At the top level of that apache stack (/var/www/html), i have an index.html file that serves up correctly whether I enter http://www.mydomain.com or http://50.X.Y.Z into the browser address.

I have an application in a subdirectory below the html file in /var/www/html/app. If I say http://50.X.Y.Z/app/, the app serves up correctly. We have been doing that for may months now.

However, if I try http://www.mydomain.com/app/, I do not get the app–I get the same index.html file that is served as if the /app/ was not appended to the end of the mydomain.com. There are no errors or notices in the apache error file.


The httpd.conf file declares
ServerName www.mydomain.com:80
UseCanonicalName On

There are no vhosts set up.

What else should I look at to explain this odd behavior.

Thanks.





---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org