it on amazon server checked following post: changing apache document root on aws ec2 not work , how edit httpd.conf file in amazon ec2 or in general: how change root directory of apache server? information provided did me far. file find in etc/apache2 folder following:
edit: content of config file is: "alias /javascript /usr/share/javascript/
options followsymlinks multiviews "
i asked 2 month ago on site: http://www.louisaslett.com/rstudio_ami/, didnt answer.
my question: how can change document root on rstudio ami server, can change directory of rstudio login page away root directory - - domain.com/login , have landing page + other folders on root (domain.com).
thank help!
edit: after answer frédéric henri , edit:
here content of rstudio.conf file.
location / { proxy_pass http://localhost:8787; proxy_redirect http://localhost:8787/ $scheme://$host/; proxy_http_version 1.1; proxy_set_header upgrade $http_upgrade; proxy_set_header connection $connection_upgrade; proxy_read_timeout 20d; access_log /var/log/nginx/rstudio-access.log; error_log /var/log/nginx/rstudio-error.log; }
assuming have index.html file in directory /home/idx/index.html, how change file then. following didnt work me:
proxy_pass http://localhost/home/idx; proxy_redirect http://localhost/home/idx/ $scheme://$host/;
or:
proxy_pass /home/idx; proxy_redirect /home/idx/ $scheme://$host/;
and configure redirect rstudio login to. thank you!
you right , looking @ right place if using apache2/httpd web server; in case of rstudio ami uses nginx web server configuration stored in /etc/nginx
you can review configure nginx multiple locations different root folders on subdomain see how can work conf file
in current configuration, defined 3 locations:
http://<web_server_ip>/
the conf file used case /etc/nginx/rstudioami/rstudio.conf
processes request , forward http://localhost:8787 rstudio running.
http://<web_server_ip>/julia
the conf file used case /etc/nginx/rstudioami/julia.conf
processes request , forward http://localhost:8000 julia running.
http://<web_server_ip>/shiny
the conf file used case /etc/nginx/rstudioami/shiny.conf
processes request , forward http://localhost:3838 shiny running.
for example have main location (which /
pointing specific folder) , changed rstudio.conf handle http://<web_server_ip>/rstudio
edit
where configure redirect rstudio login to
if want rstudio login page accessible http://<server>/rtudio
(for example) need change in `/etc/nginx/rstudioami/rstudio.conf``
location /rstudio/ { proxy_pass http://localhost:8787/; proxy_redirect http://localhost:8787/ $scheme://$host/; proxy_http_version 1.1; proxy_set_header upgrade $http_upgrade; proxy_set_header connection $connection_upgrade; proxy_read_timeout 20d; access_log /var/log/nginx/rstudio-access.log; error_log /var/log/nginx/rstudio-error.log; }
if want point main http://<server>/index.html
pointing /home/idx/index.html
need change in /etc/nginx/sites-enabled/rstudioami.conf
, have main location defined pointing root element
map $http_upgrade $connection_upgrade { default upgrade; '' close; } server { listen 80 default_server; index index.html; location = / { root /var/www/html; } include /etc/nginx/rstudioami/*.conf; }
note: anytime make change nginx conf file, need restart nginx. with: /etc/init.d/nginx restart
.
Comments
Post a Comment