0

I am trying to add two virtual hosts to apache.

In httpd.conf i uncomment these lines:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_module modules/mod_proxy_connect.so
Include conf/extra/httpd-vhosts.conf

And i add these to httpd-vhosts.conf;

<Directory "C:/dev/cfusion">
    Order allow,deny
    Allow from all
</Directory>

NameVirtualHost *:80

<virtualhost *:80>  
    DocumentRoot "C:\dev\cfusion"
    ServerName cfusion
    ProxyRequests Off  
<proxy *>  
    Order deny,allow  
    Allow from all  
</Proxy>  
    ProxyPass / http://127.0.0.1:8080/cfusion/  
    ProxyPassReverse / http://127.0.0.1:8080/cfusion/  
    ErrorLog "logs/cfusion.local-error.log"
    CustomLog "logs/cfusion.local-access.log" common
</VirtualHost>

<virtualhost *:80>  
    DocumentRoot "C:\dev\cfusion"
    ServerName railo
    ProxyRequests Off  
<proxy *>  
    Order deny,allow  
    Allow from all  
</Proxy>  
    ProxyPass / http://127.0.0.1:8080/railo/  
    ProxyPassReverse / http://127.0.0.1:8080/railo/  
    ErrorLog "logs/railo.local-error.log"
    CustomLog "logs/railo.local-access.log" common
</VirtualHost>

When i comment the Include, i see the default apache site, otherwise i get an 500 internal server error. Whats the problem?

When i un-comment

ProxyPass / http://127.0.0.1:8080/railo/

then i dont get the 500 error anymore, but the proxying does not work :(

1
  • You're getting a 500 error? Well, what does your error log say?
    – larsks
    Dec 14, 2009 at 14:24

4 Answers 4

3

While probably not the source of your problem, this looks like an error:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_module modules/mod_proxy_connect.so
Include conf/extra/httpd-vhosts.conf

That second line should be:

LoadModule proxy_connect_module modules/mod_proxy_connect.so
2
  • yes i have incorrectly added a wrong line but my httpd.conf is fine.
    – mrt181
    Dec 14, 2009 at 14:57
  • Don't forget to accept this answer if it has solved your problem. Dec 14, 2009 at 16:45
0

Maybe it's because of the xml tags, which begin lowercase and end in uppercase.

i.e. <proxy *> ... </Proxy>

I have no Apache here to test, but give it a try

1
  • does not change anything
    – mrt181
    Dec 14, 2009 at 14:58
0

Some things you can try:

  1. Don't use the DocumentRoot directive, you don't need it for vhosts using proxy.
  2. Remove <proxy *> ... </proxy> directives. This is not used for reverse proxy.
  3. Define a ServerAlias directive and a ProxyTimeout
  4. Put the ProxyRequests before ProxyPass and ProxyPassReverse

Hope it works.

2
  • Your suggestions do not help
    – mrt181
    Dec 14, 2009 at 16:11
  • Have you tried to set the LogLevel to debug to see what is happening?
    – Jr. Hames
    Dec 14, 2009 at 17:17
0

Ok, i have found the error. All i had to do is un-comment the proxy submodule:

LoadModule proxy_http_module modules/mod_proxy_http.so

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .