To be able to access the Dspace Frontend using the domain name or IP address with default port 80 instead of 4000, we need to configure a reverse proxy. For the purpose and simplicity in this guide, we will use Nginx. But you na use othe engine such as Apache
Install Nginx on Ubuntu with the command:
sudo apt install nginx -y
Create a virtual host file:
sudo nano /etc/nginx/conf.d/dspace_ui.conf
Add the below lines replacing your domain name/IP address appropriately:
server {
listen 80;
server_name YOUR-DOMAIN-NAME;
access_log /var/log/nginx/dspace-access.log;
error_log /var/log/nginx/dspace-error.log;
location / {
proxy_pass http://localhost:4000/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
Once created, restart nginx:
sudo service nginx restart
Now you should be able to access your Dspace 7 Frontend using your domain name or IP address. For example http://dspace.navitrack.co.tz
In case you find error 500, you need to modify the dspace.ui.url on your Dspace Backend to match what you are trying to access the server with.