First we will check if we are running on port 80 or port 8080
For this go to link below
If it is running on port 80 it will give error.
Now we know that we are running on port 8080 so lets change it to port 80 for tomcat and port 8080 for apache
Tomcat Port Change
We have to change the port in three different places
sudo nano /opt/tomcat/conf/server.xml
sudo nano /dspace/config/dspace.cfg
sudo nano /dspace/config/local.cfg
sudo nano /opt/tomcat/conf/server.xml
By default
<Connector port="8080" ', and change it to '<Connector port="80">
2. sudo nano /dspace/config/dspace.cfg
By default
dspace.baseUrl = http://localhost:8080 (change 8080 to 80)
and
solr.server = http://localhost:8080/solr (change 8080 to 80)
3. sudo nano /dspace/config/local.cfg
By default
dspace.baseUrl = http://localhost:8080 (change 8080 to 80)
and
solr.server = http://localhost:8080/solr (change 8080 to 80)
CHANGE THE PORT IN APACHE
GO TO TERMINAL
sudo nano /etc/apache2/ports.conf
By default
Listen 80 (change it to 8080)
2. sudo nano /etc/apache2/sites-enabled/000-default.conf
By default
<VirtualHost *:80> (change it to 8080)
3. systemctl restart apache2
4. sudo netstat -tlpn| grep apache
5. sudo ss -tlpn| grep apache
RESULTS
Tomcat was earlier running on port 8080 but now its running on port 80 as I changed it with Apache