Change the default tomcat port 8080 to 80

1,158 views
Skip to first unread message

Thiago Gonzaga Belmonte Galvão

unread,
Aug 19, 2019, 2:38:40 PM8/19/19
to DSpace Community
Hi guys, what is the simplest way to change the 8080 port to 80 so user won't need to type 8080 to access the application?

Nguyễn Tuấn Vũ

unread,
Aug 19, 2019, 10:05:25 PM8/19/19
to DSpace Community

You can change port 8080 to 80 of file server.xml in folder tomcat and change port file config ( dspace.cfg, local.cfg ) of Dspace ! 
i hope it will help you !

Tim Donohue

unread,
Aug 21, 2019, 11:16:51 AM8/21/19
to Thiago Gonzaga Belmonte Galvão, DSpace Community
Hello,

In the official DSpace installation instructions, we also provide a guide for one way to run DSpace on standard ports (port 80 and 443).  The approach we recommend is running an Apache HTTPD webserver in front of Apache Tomcat.  However, there are other approaches (as others have mentioned).


If you have further questions, I'd recommend asking them on our Tech Support mailing list (dspace-tech) or via one of the other support options listed at https://wiki.duraspace.org/display/DSPACE/Support

Tim

From: dspace-c...@googlegroups.com <dspace-c...@googlegroups.com> on behalf of Thiago Gonzaga Belmonte Galvão <thiago...@ifmg.edu.br>
Sent: Monday, August 19, 2019 1:38 PM
To: DSpace Community <dspace-c...@googlegroups.com>
Subject: [dspace-community] Change the default tomcat port 8080 to 80
 
Hi guys, what is the simplest way to change the 8080 port to 80 so user won't need to type 8080 to access the application?

--
All messages to this mailing list should adhere to the DuraSpace Code of Conduct: https://duraspace.org/about/policies/code-of-conduct/
---
You received this message because you are subscribed to the Google Groups "DSpace Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dspace-communi...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dspace-community/aa5bee22-3ed1-414a-938c-fc922f8a67e1%40googlegroups.com.

Thiago Gonzaga Belmonte Galvão

unread,
Aug 23, 2019, 2:30:20 PM8/23/19
to Tim Donohue, DSpace Community
Hi Guys,

I tried this changes
On server.xml

<Connector port="8080" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
      URIEncoding="UTF-8"/>

to

<Connector port="80" protocol="HTTP/1.1"
               connectionTimeout="20000"
               redirectPort="8443"
      URIEncoding="
UTF-8"/>

On dspace.cfg

solr.server = http://localhost/solr

Stop and Start Tomcat.

After this no access to my site

I will try the official DSpace installation instructions.

Tran Huu Trung (TTTV.ICT)

unread,
Aug 26, 2019, 9:53:00 AM8/26/19
to Thiago Gonzaga Belmonte Galvão, Tim Donohue, DSpace Community
Check if solr running after change port, please. It's take time to reindex.
--

ĐẠI HỌC DÂN LẬP HẢI PHÒNG

Tran Huu Trung / Giám đốc trung tâm thông tin thư viện 
tru...@hpu.edu.vn / 0989150269

ĐẠI HỌC DÂN LẬP HẢI PHÒNG 
Office: 0313738087 / Fax: 0313740476 
36 Dân Lập, Dư Hàng Kênh, Lê Chân, Hải Phòng 
www.hpu.edu.vn

Facebook  Google +  LinkedIn  Github 



Vào Th 7, 24 thg 8, 2019 vào lúc 01:30 Thiago Gonzaga Belmonte Galvão <thiago...@ifmg.edu.br> đã viết:

Mark H. Wood

unread,
Aug 27, 2019, 9:14:06 AM8/27/19
to DSpace Community
On Sat, Aug 24, 2019 at 08:58:14AM +0700, 'Tran Huu Trung (TTTV.ICT)' via DSpace Community wrote:
> Check if solr running after change port, please. It's take time to reindex.
> --
>
> [image: ĐẠI HỌC DÂN LẬP HẢI PHÒNG] <http://www.hpu.edu.vn/>
>
> Tran Huu Trung / Giám đốc trung tâm thông tin thư viện
> tru...@hpu.edu.vn / 0989150269
>
> ĐẠI HỌC DÂN LẬP HẢI PHÒNG
> Office: 0313738087 / Fax: 0313740476
> 36 Dân Lập, Dư Hàng Kênh, Lê Chân, Hải Phòng
> www.hpu.edu.vn
>
> [image: Facebook] <https://htmlsig.com/t/0000001BP2D7A> [image: Google +]
> <https://htmlsig.com/t/0000001BP4RZJ> [image: LinkedIn]
> <https://htmlsig.com/t/0000001BNRFVY> [image: Github]
> <https://htmlsig.com/t/0000001BSVYQQ>
>
>
> Vào Th 7, 24 thg 8, 2019 vào lúc 01:30 Thiago Gonzaga Belmonte Galvão <
> thiago...@ifmg.edu.br> đã viết:
>
> > Hi Guys,
> >
> > I tried this changes
> > On server.xml
> >
> > <Connector port="8080" protocol="HTTP/1.1"
> > connectionTimeout="20000"
> > redirectPort="8443"
> > URIEncoding="UTF-8"/>
> >
> > to
> >
> >
> >
> >
> > *<Connector port="80" protocol="HTTP/1.1"
> > connectionTimeout="20000" redirectPort="8443"
> > URIEncoding="*UTF-8"/>
> >
> > On dspace.cfg
> > dspace.baseUrl = http://repositorio.gv.ifmg.edu.br:8080
> > solr.server = http://localhost:8080/solr
> >
> > *dspace.baseUrl = http://repositorio.gv.ifmg.edu.br
> > <http://repositorio.gv.ifmg.edu.br>*
> > *solr.server = http://localhost/solr <http://localhost/solr>*
> >
> > Stop and Start Tomcat.
> >
> > After this no access to my site

If you are trying this on a Unix-like OS (such as Linux), Tomcat will
not be able to open port 80 unless it is running in a privileged
account. Tomcat is not designed to run as a privileged user, and
should not, for example, routinely run as 'root'.

However, it *is* designed to be *started* privileged and then drop
privileges, as a good daemon should. This requires starting it with
the use of 'jsvc', which handles startup as most daemons do: call the
code (in Tomcat) to initialize the service (which includes opening the
ports), change user to the nonprivileged account, and call the main
body of the service. I've never understood why this is not used by
all Linux distributions. I tried modifying the Gentoo startup script
for Tomcat to do this, but it was too much trouble to maintain across
Tomcat updates and I gave it up. Look for Apache Commons Daemon if
you want to know more about 'jsvc'.

There are distribution-specific hacks that accomplish the same thing.
If you'll tell us what OS you are using, someone may be able to
suggest one.

Another method is to proxy through a general-purpose web server such
as Apache HTTPD or Nginx, which knows how to daemonize properly.
Tomcat then runs as a nonprivileged user on a nonprivileged port.
This works well here, and is what I currently recommend.

--
Mark H. Wood
Lead Technology Analyst

University Library
Indiana University - Purdue University Indianapolis
755 W. Michigan Street
Indianapolis, IN 46202
317-274-0749
www.ulib.iupui.edu
signature.asc
Reply all
Reply to author
Forward
0 new messages