Member
Member
jerep6   2012-12-11, 23:32
#1
Hello, I am trying to use zenphoto with reverse proxy (proxypass directive).

Apache reverse proxy on the web frontend server :
ProxyPass /zp http://192.168.1.72/~jerep6/zenphoto
ProxyPassReverse /zp http://192.168.1.72/~jerep6/zenphoto

On 192.168.1.72 Zenphoto's installation folder is /home/jerep6/public_html/zenphoto and the web path is http://192.168.1.72/~jerep6/zenphoto
Throught the proxy, I access to zenphoto with the given url : http://url_to_frontend/zp/

However, the paths of css, js, images ... are /~jerep6/zenphoto/
Exemple : <script type="text/javascript" src="/~jerep6/zenphoto/zp-core/js/jquery.js"></script>
I can't read the file because I haven't access to it through the web frontend server.

So I uncomment the two « define » in zp-data/zenphoto.cfg
define('WEBPATH', '/zp');
define('SERVERPATH', '/home/jerep6/public_html/zenphoto');

Now the scripts and images load successfuly but the action of login form (printLoginForm) is not good : /~jerep6/zenphoto/ .
For exemple :
<form name="login" action="<?php echo html_encode($_SERVER['REQUEST_URI']); ?>" method="post">
become
<form name="login" action="/~jerep6/zenphoto/index.php?album=Animaux" method="post">
And when I submit form, the target url is not valid (404) http://url_to_frontend/~jerep6/zenphoto/ (missing zp)

Moreover, the redirect url is /zp/~jerep6/zenphoto/index.php?album=Animaux instead of /zp/index.php?album=Animaux
<input type="hidden" name="redirect" value="<?php echo html_encode($redirect); ?>" />
become
<input type="hidden" name="redirect" value="/zp/~jerep6/zenphoto/index.php?album=Animaux" />

Zenphoto and reverse proxy are compatibles ?
Member
Member
sbillard   2012-12-12, 01:00
#2
Zenphoto can work (using mod_rewrite) with only one URL. So you need to choose what you want and install using that link. If you have done this and it still does not work then your reverse proxy is not behaving consistently.
Member
Member
jerep6   2012-12-12, 23:01
#3
I think all is OK but it doesn't work.
I drop the reverse proxy.

Thanks for your response.
  
Powered By MyBB, © 2002-2026 MyBB Group.
Made with by Curves UI.