Setup Orthanc for external network viewing

hello all,

is it possible to setup orthanc on my home server and access DICOM files remotely? I have opened ports for orthanc and set that up locally no problem. i installed nginx and added the code:

location /orthanc/ { proxy_pass http://127.0.0.1:8042; proxy_set_header HOST $host; proxy_set_header X-Real-IP $remote_addr; rewrite /orthanc(.) $1 break; add_header ‘Access-Control-Allow-Credentials’ ‘true’; add_header ‘Access-Control-Allow-Headers’ ‘DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type’; add_header ‘Access-Control-Allow-Methods’ ‘GET, POST, OPTIONS’; add_header ‘Access-Control-Allow-Origin’ ''; }

to the nginx config file. however, im not sure what the next step is! Any help would be greatly appreciated

Hello,

This is definitely possible. For instance, our demo servers are hosted behind nginx:
https://demo.orthanc-server.com/

Check out the Orthanc Book to learn how to use nginx as a reverse proxy to Orthanc:
https://book.orthanc-server.com/faq/nginx.html

Sébastien-

I added the code for reverse proxy, but where do I put the orthanc folder in the nginx directory? Is that the next step?

You don’t have to map anything else (in particular, no “orthanc folder” must be put in nginx).

If you exactly followed the instructions from the Orthanc Book, Orthanc will be directly accessible at “http://localhost/orthanc/”:
https://book.orthanc-server.com/faq/nginx.html

You might want to consider using a service like ngrok to achieve this without too much port and router reconfiguration. It’s a potentially safer and simpler approach.

Dan

Hello, I think the configuration is correct, but, when accessing the URL, the original path must be added.

Example:
Orthanc server http: //10.0.0.100: 8042 / osimis-viewer / app / index.html? Study = c37c …

In nginx on ip: 10.0.0.150

location / orthanc {
proxy_pass http://10.0.0.100:8042/;

}

The URL to call via nginx server:
http: //10.0.0.150/orthanc/osimis-viewer/app/index.html? study = c37c …

I hope it is useful.
Marcelo

I actually switched to apache lounge and successfully setup the web server! I can now see my webserver with my public IP

however when I try to connect to orthanc it doesnt work. 81.34.45.33:8042/app/explorer.html (i used a fake IP) should work in theory right? I added this code to the httpd.conf:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
ProxyRequests On

ProxyPass /Orthanc/ http://localhost:8000/ retry=0

I have ports 4242, 8042, 80 opened on my router though…can anyone guide me in the right direction?

Hi
Your browser might have security requirement. To properly setup, you need HTTPS, you need a valid DNS name (your domain), and you need to configure certificate and key.

In your case, to bypass all those and just test whether orthanc is up, you can fire a curl command, such as
curl -k -X GET https://fake-ip-address:8042/app/explorer.html -I -u user:passwd

In reality, you should not open port 80, and use HTTPS on port 8042, TLS on port 4242. It is illegal in most countries, to transmit clinical information without TLS encryption.
If you have a fixed public IP and just wanted to test your idea, you can edit your /etc/hosts file to fake dns resolution, and use a self-signed certificate that matches your URL.

Hi , did u solve this issue?

I am using reverse proxy with nginx proxymanager and works great with ssl certificates i upload to proxy manager.

I was able to do it also with gui of a Synology nas

Στις Παρ, 3 Δεκ 2021, 04:22 ο χρήστης mike+66 <anciestdragon@gmail.com> έγραψε: