Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have an Oracle application server(10.1.2) which runs on a Apache web server. We have multiple websites running on the different server instances of the Oracle application server.

We have our virtual hosting as follows.

server is webserver.companyname.com and in virtual hosting I have the following

<VirtualHost *:80>
    ServerName www.example.com
    ServerAlias example.com *.example.com
    DocumentRoot "/oracle/app/oracle/product/101202/mid101202/Apache/Apache/htdocs"

     <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
    </Location>

#uptohere
</VirtualHost>

#upto here
<VirtualHost *:80>
    ServerName www.example1.com
    ServerAlias example1.com *.example1.com
    DocumentRoot "/oracle/app/oracle/product/101202/mid101202/Apache/Apache/htdocs2"

    #added by reyaz on 19th july 10
    <Location /server-status>
        SetHandler server-status
        Order deny,allow
        Deny from all
    </Location>

#uptohere
</VirtualHost>

Now everything working smootly, but when I type www.example.com or www.example1.com I get redirected to the actual server path which is http://webserver.companyname.com/example/index.html , http://webserver.companyname.com/example1/index.html.

I don't want this to happen instead we want to configure it in such a way that this would be www.example.com/index.html.

As you all guessed by now I am a newbie in Apache server. Any help is much appreciated.

share|improve this question

2 Answers 2

There doesn't appear to be anything in your vhost configuration above that would cause the issue you are seeing so your solution lies elsewhere. Check through your apache configuration including any .htaccess files and look for mod_rewrite directives that could be doing this.

share|improve this answer

All you should need to do is to add /example or /example1 to the end of your DocumentRoot paths. This will work unless you also need to serve up files in /oracle/app/oracle/product/101202/mid101202/Apache/Apache/htdocs in which case you may be able to serve that content up with an Alias.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.