Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: why does mod_proxy prevent access on a local website? |
|
Author |
|
AdamW
Joined: 12 Jul 2016 Posts: 2 Location: Germany, Wiesbaden
|
Posted: Tue 19 Jul '16 11:25 Post subject: why does mod_proxy prevent access on a local website? |
|
|
Hi all,
would be great, if anybody could help me with my problem here...
i defined a vhost which should call a tomcat application in the background (see code section below...)
If i comment out the directives ProxyRequests, ProxyPass and ProxyPassReverse, i can see that the index.html is taken if calling the virtual host address. The file includes the complete URL with parameters as hard coded redirect. Of course then Apache doesn't know, where to send it.
If i include the directives ProxyRequests, ProxyPass and ProxyPassReverse in the configuration again, Apache is no more accessing the file index.html under the specified directory! If i take a look into the error logfile, i see that just "/" is sent to http://SRVITSARISPUTST.foo.bar.de:19990/.
How do i manage it, to access the index.html even if configured the vhost with proxy-settings?
Thanks for any hint!
Adam
Code: |
<VirtualHost helakos-web-tst.foo.bar.de>
ServerName helakos-web-tst.foo.bar.de
DocumentRoot "C:/Apache24/htdocs/helakos-web-tst.foo.bar.de"
ErrorLog "logs/new-error.log"
CustomLog "logs/new-access.log" common
<Directory "C:/Apache24/htdocs/helakos-web-tst.foo.bar.de">
Require all granted
</Directory>
DirectoryIndex index.html
ProxyRequests off
ProxyPass / http://SRVITSARISPUTST.foo.bar.de:19990/
ProxyPassReverse / http://SRVITSARISPUTST.foo.bar.de:19990/
</VirtualHost> |
|
|
Back to top |
|
James Blond Moderator
Joined: 19 Jan 2006 Posts: 7373 Location: Germany, Next to Hamburg
|
Posted: Fri 22 Jul '16 0:21 Post subject: |
|
|
You can exclude the index.html
Code: |
ProxyPass /index.html ! |
How ever if you request the domain without the index.html in the url you still will see the backend server.
So you can add the index.html on the backend server or use <Location> for you reverse proxy config. |
|
Back to top |
|
|
|
|
|
|