0

Don't run in apache2!!!

asked 2009-03-12 12:32:51 +0800

LucasBorges gravatar image LucasBorges
6

Hi!

I need help with Apache2 and Virtual Host.

When I run my application in the http://localhost:8080/showGroup.html all is fine.
But if I run in my virtual host:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName myapplication.wiface.com.br
DocumentRoot E:/projects/native/native-web/src/main/htdocs/myapplication-web.com.br

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

ProxyRequests Off
ProxyVia Block
ProxyPassReverse / http://127.0.0.1:8080/
ProxyTimeout 120

RewriteEngine On
RewriteLogLevel 9
RewriteLog logs/myapplication.wiface.com.br

RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*) /index.html

RewriteCond %{REQUEST_URI} \/img
RewriteRule ^(.*) $1

RewriteCond %{REQUEST_URI} \.(css|js)$
RewriteRule ^(.*) $1

RewriteCond %{REQUEST_URI} ^/.*
RewriteRule /(.*) http://127.0.0.1:8080/$1 [P,L]

</VirtualHost>

The CSS and JS don't load!

I need to know where I am wrong.

Please, help me.

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-03-12 13:48:09 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

Hmm,

have you running the needed servlet-container too??
Like a tomcat.

Stephan

link publish delete flag offensive edit

answered 2009-03-12 13:58:55 +0800

LucasBorges gravatar image LucasBorges
6

Hi!

I resolved the problem.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName myapplication.wiface.com.br
DocumentRoot E:/projects/native/native-web/src/main/htdocs/myapplication-web.com.br

<Proxy *>
Order allow,deny
Allow from all
</Proxy>

ProxyRequests Off
ProxyVia Block
ProxyPassReverse / http://127.0.0.1:8080/
ProxyTimeout 120

RewriteEngine On
RewriteLogLevel 9
RewriteLog logs/myapplication.wiface.com.br

RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^(.*) /index.html

RewriteCond %{REQUEST_URI} \/zkau\/*
RewriteRule /(.*) http://127.0.0.1:8080/$1 [P,L]

RewriteCond %{REQUEST_URI} \/img
RewriteRule ^(.*) $1

RewriteCond %{REQUEST_URI} \.(css|js)$
RewriteRule ^(.*) $1

RewriteCond %{REQUEST_URI} ^/.*
RewriteRule /(.*) http://127.0.0.1:8080/$1 [P,L]

</VirtualHost>

link publish delete flag offensive edit

answered 2009-03-12 14:11:25 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

can you make bold the changes? thanks

link publish delete flag offensive edit

answered 2009-03-12 15:56:32 +0800

dastultz gravatar image dastultz
797 9

A bit off topic, but you would be better off with ProxyPass and AJP13, I think. Something like this:

#ProxyRequests On (commented out or set to Off)
<VirtualHost...
   ProxyPass /myapp/images !
   ProxyPass /myapp/script !
   ProxyPass /myapp/css !
   ProxyPass /myapp ajp://localhost:8009/myapp/
</VirtualHost>

(images, css, script are static resources served by Apache)
Research ProxyPass, mod_proxy, mod_proxy_ajp before experimenting!

/Daryl

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-03-12 12:32:51 +0800

Seen: 432 times

Last updated: Mar 12 '09

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More