Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

127
Views
Rewriting extensionless URLs to .Rmd with R Shiny server on nginx

I have nginx listening on port 80 and an R Shiny Server behind a firewall at port 3838. There is a reverse proxy to send all requests to the /internal directory through a password dialog on the browser before it goes to the Shiny server.

I am trying to figure out how to turn URLs that the user enters like http://my.domain/internal/SomeProgram to http://my.domain/internal/SomeProgram.Rmd so that the Shiny server can process them. I don't know whether to use try_files or something like:

if (!-e $request_filename) {
    rewrite ^(.*)$ /$1.Rmd;     
}

This part below works, but I don't know where or how to insert the above code (or use completely different code) to make the extensionless to .Rmd conversion:

location /internal {
  auth_basic "Admin Area";
  auth_basic_user_file /etc/nginx/.htpasswd;
  proxy_pass http://localhost:3838/internal/;
  proxy_redirect / $scheme://$http_host/;
}

location /shiny/ {
  rewrite ^/shiny/(.*)$ /$1 break;
  proxy_pass http://localhost:3838/;
  proxy_redirect / $scheme://$http_host/;
  proxy_http_version 1.1;
  proxy_set_header Upgrade $http_upgrade;
  proxy_set_header Connection $connection_upgrade;
  proxy_read_timeout 20d;
  proxy_buffering off;
}

Any insights would be greatly appreciated. Thanks :)

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!