Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

How to setup proxy_pass/rewrite for LimeSurvey server behind external server

  • leemgs
  • leemgs's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
7 months 1 week ago - 7 months 1 week ago #250446 by leemgs
1. Your LimeSurvey version:  
2. Own server or LimeSurvey hosting: My own server
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.1 LTS"

3. Survey theme/template: default 


==================

I have installed the LimeSurvey software on the 192.168.10.115 server. 
I use the Firefox web browser to access http://192.168.10.115/ and use the features. 
Recently, I have had a technical question regarding the prox_pass option of Nginx. 

When I access my server, I want to be directed to the http://192.168.10.115 server. 


Here is the flowchart of how I want it to work.
for me (in the USA) ---> (my external server) ---> http://192.168.10.115 (my internal server for LimeSurvey)

So, I set the proxy_pass and rewrite statements of the NGINX server on the
for the NGINX server on the server. 

$ sudo vi /etc/nginx/conf.d/
     location /mysurvey/ {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host ;
        rewrite /mysurvey/(.*) /$1;
        proxy_pass http://192.168.10.115:80;  
        server_tokens off;

        proxy_redirect off;
        proxy_read_timeout 30000;
        break;
    }


When I access , http://192.168.10.115 content is accessible,
but the Limesurvery images and related contents are not displayed properly as below. 
Screenshot
* I could get unexpected display content when I visit the
  • Select language
  • 한국어 - 한글
    • Select language
      한국어 - 한글
      뒤로
      עברית - 헤브라이어
      Беларускі - 벨라루스어
      Кыргызча - 키르키즈어
      Македонски - 마케도니아어
      Монгол - 몽골 어
      Русский - 러시아어
      Српски - 세르비아 어 (키릴 문자)
      հայերեն - 아르메니아 어
      اردو - 우르두어
      دری - 다리 어
      عَرَبيْ - 아랍어
      فارسی - 페르시아어
      پښتو - 파슈토 어
      کوردیی ناوەندی - 쿠르드 어 (소라니)
      मराठी - 마라티 어
      हिन्दी - 힌디어
      íslenska - 아이슬란드어
      বাংলা - 벵골어
      ਪੰਜਾਬੀ - 펀자브어
      ગુજરાતી - 그쟈라트 어
      தமிழ் - 타밀 어
      简体中文 - 중국어(간자체)
      繁體中文語系 - 중국어(전통적인 홍콩어)
      繁體中文(台灣) - 중국어(전통적인 대만)
      සිංහල - 싱할라어
         


Is there any workaround for this issue? Any hints or clues are welcome. 

BRs, 
Geunsik Lim. 
 
Last edit: 7 months 1 week ago by leemgs.

Please Log in to join the conversation.

  • leemgs
  • leemgs's Avatar Topic Author
  • Offline
  • New Member
  • New Member
More
6 months 2 weeks ago #251134 by leemgs
I Solved this issue by introducing NAT-based port forwarding method.

For example,
(my external server:8080) ---> http://192.168.10.115:8080
Then, $ firefox HTTP://my-external-server:8080/

Please Log in to join the conversation.

Lime-years ahead

Online-surveys for every purse and purpose