Forum OpenACS Development: Port Redirection

Collapse
Posted by Iuri Sampaio on
Hi there,

I've got problems using NGINX on port 80, proxying http and https to higher 8000 ports, then booting up Naviserver also on those higher ports such as 8000, 8080 and 8070.

OpenACS core source always uses hostname and port assigned within config.tcl. The result is that user gets redirected all time from one to the other section over http ports. http://evex.co and http://evex.co:8070
The same happens to SSL, https://evex.co and https://evex.co:8443

How would I nicely inhibit this behavior, working always with hostname, without using ports?

I tried a work around using hostnodes but it didn't work as expected.

Best wishes,

Collapse
2: Re: Port Redirection (response to 1)
Posted by Claudio Pasolini on
Hi Juri,

Go to /admin/site-map, select the Tcl Library service and set the parameter SuppressHttpPort to 1.

Collapse
3: Re: Port Redirection (response to 1)
Posted by Benjamin Brink on
Hi Iuri,

In Tcl Library service (acs-tcl) parameters
Try setting SuppressHttpPort to 0

cheers,

Ben

Collapse
4: Re: Port Redirection (response to 3)
Posted by Benjamin Brink on
LOL. Yes. set to 1.
Collapse
5: Re: Port Redirection (response to 4)
Posted by Iuri Sampaio on
Hi there,

The action fixed port redirection, however it has broken almost all css and js for the entire website.

Since relative paths was always a constraint, I wonder what is the cause of failure?

It seems ad_proc template::head::add_css, add_javascript, template::head::* lost track of the directory path /resources/<package_name>/...

template::head::add_css -href "/resources/evex-core/css/base.css"

Best wishes,
Iuri

I have only logs from browser dev console



Failed to load resource: the server responded with a status of 404 (Not Found)
http://evex.co/resources/evex-core/js/responsive-nav.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://evex.co/resources/evex-core/js/form-submit.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://evex.co/resources/evex-core/js/popup.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://evex.co/resources/evex-core/js/reveal-animation.js Failed to load resource: the server responded with a status of 404 (Not Found)
http://evex.co/resources/evex-core/js/bg-videos.js Failed to load resource: the server responded with a status of 404 (Not Found)

Collapse
6: Re: Port Redirection (response to 5)
Posted by Iuri Sampaio on
Ok, fixed. Broken libraries works now. It was an unrelated issue. The acs-tcl parameter works beautifully.

Best wishes,