Quantcast
Channel: Zenphoto forum
Viewing all articles
Browse latest Browse all 2917

jerep6 on "reverse proxy and login form"

$
0
0

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 ?


Viewing all articles
Browse latest Browse all 2917

Trending Articles