Skip to Main Content

Application Development Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

apache virtual host config and rewrite rules

DanKozlowskiAug 25 2016

Anyone got a good working sample of an apache virtual host file.

I am trying the below.  If I set location to the /sites/sand rather than / then the rewrite rule does not go to the sites vers and pulls from apache. And you get an apache not found.

If i set the path to below, then everything goes to weblogic/sites, and the webfiles will not render. You get a weblogic not found.

<VirtualHost *:80>

  ServerName wc12c.xumulus.com

  DocumentRoot /var/www/sites/webfiles

  Options FollowSymLinks

  <Location /sites>

    SetHandler weblogic-handler

    WeblogicCluster wc12c.xumulus.com:7003

    PathPrepend /sites/sand

  </Location>

  ErrorLog logs/error-sites.log

  LogLevel debug

  CustomLog logs/access-sites.log combined

  ProxyRequests Off

  RewriteEngine on

  RewriteLog logs/sites-rewrite.log

  RewriteLogLevel 4

  RewriteRule ^.*/webfiles/(.*)$ /webfiles/$1 [L,PT]

  RewriteRule ^(.*)$ /sites/sand$1 [L]

</VirtualHost>

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 22 2016
Added on Aug 25 2016
0 comments
246 views