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 <[email protected]> To: [email protected] 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 <[email protected]> >To: [email protected] >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: [email protected] >For additional commands, e-mail: [email protected] > > > >
