Skip to content

Instantly share code, notes, and snippets.

@serverok
Created February 1, 2021 08:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save serverok/11ec5a986112dc91c2e697b556437a77 to your computer and use it in GitHub Desktop.
Save serverok/11ec5a986112dc91c2e697b556437a77 to your computer and use it in GitHub Desktop.
root@vmi465483:~# cat /etc/nginx/sites-enabled/dspace.conf
server {
server_name repositorio.unijuanpablo.edu.pe;
root /var/www/html/;
client_max_body_size 2000m;
location / {
return 301 http://repositorio.unijuanpablo.edu.pe/xmlui/;
}
location ^~ /.well-known/acme-challenge/ {
root /var/www/html;
}
location /jspui/ {
index index.jsp;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/jspui/;
proxy_redirect http://localhost:8080/jspui/ https://repositorio.unijuanpablo.edu.pe/jspui/;
proxy_buffering off;
proxy_store off;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 120;
}
location /oai/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/oai/;
proxy_redirect http://localhost:8080/oai/ https://repositorio.unijuanpablo.edu.pe/oai/;
proxy_buffering off;
proxy_store off;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 120;
}
location /xmlui/ {
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://localhost:8080/xmlui/;
proxy_redirect http://localhost:8080/xmlui https://repositorio.unijuanpablo.edu.pe/xmlui;
proxy_buffering off;
proxy_store off;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 120;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/repositorio.unijuanpablo.edu.pe/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/repositorio.unijuanpablo.edu.pe/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = repositorio.unijuanpablo.edu.pe) {
return 301 https://$host$request_uri;
} # managed by Certbot
listen 80;
server_name repositorio.unijuanpablo.edu.pe;
return 404; # managed by Certbot
}
root@vmi465483:~#
@1988gadocansey
Copy link

Excelent

@1988gadocansey
Copy link

when i login as administrator and click on the administer menu, the system redirects me to the login page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment