Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Localhost connection works, remote using Apache proxy does not #3

Closed
siwyd opened this issue May 10, 2011 · 1 comment
Closed

Localhost connection works, remote using Apache proxy does not #3

siwyd opened this issue May 10, 2011 · 1 comment

Comments

@siwyd
Copy link

siwyd commented May 10, 2011

I'm not sure this is a problem with Ajaxterm, but I don't know where else to ask for support for this problem. Ajaxterm works perfectly when I connect from localhost. Connecting remotely using the Apache reverse proxy does not work. All I get is a blank page, though it seems to connect to Ajaxterm, because the title of the page is 'Ajaxterm'. I have used Apache SSL for a long time now, so the only thing I changed for proxy setup is the following:

ProxyRequests Off
<Proxy *>
AuthType Basic
AuthName "Enter username/password"
AuthUserFile /etc/httpd/conf/.htpasswd
Require valid-user

ProxyPass /term http://localhost:8022/
ProxyPassReverse /term http://localhost:8022/

@kev82
Copy link

kev82 commented Aug 3, 2011

The problem is the html page has the following references in it:

 <link rel="stylesheet" type="text/css" href="ajaxterm.css"/>
 <script type="text/javascript" src="sarissa.js"></script>
 <script type="text/javascript" src="sarissa_dhtml.js"></script>
 <script type="text/javascript" src="ajaxterm.js"></script>

If you look in your server logs, you will probably find undefined references when it looks for these files. I guess you could try hosting them locally, but what I did instead was add a leading '/' to the href/src and then used mod_proxy_html to rewrite. The Apache config (security bits missing is)

    <IfModule mod_proxy.c>
    <IfModule mod_proxy_http.c>
    <IfModule mod_proxy_html.c>
            <Location /amarant_console>
                    Order allow,deny
                    ProxyHTMLURLMap / /amarant_console/
                    SetOutputFilter proxy-html
            </Location>
            ProxyPass /amarant_console/ http://localhost:8022/
            ProxyPassReverse / http://localhost:8022/
    </IfModule>
    </IfModule>
    </IfModule>

@siwyd siwyd closed this as completed Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants