简体   繁体   中英

Starting a bootRun process on port 80 as non-root user with Spring

I'm trying to use Port 80 as a non-root user and I've seen the discussions about using IP Tables but I'd like to use the tomcat configuration files to be able to modify these bindings. There is an option for AUTHBIND that allows using ports <1024 but I have no idea where the Spring tomcat files are located... There is no tomcat service running when I start my Spring process so where is the Spring tomcat server actually located? Where can I see the configuration files etc?

I think you have a wrong approach. I don't recommand you to try to use HTTP port 80 directly.

A good practice is to use Apache HTTP Server redirection or alias :

Explaination :

You will start your Tomcat with "classic" port (such as 8080 or 9080 or anything else over 1024). Then, you will configure your Apache server to redirect HTTP request from HTTP port 80 to your Tomcat server.

Do follow steps:
1. Go to your application.properties if it doesn't exist.
2. Create a application.properties inside src/main/resources folder.
 example->/src/main/resources/application.properties
3. Simply add this property  server.port = 80 or if you want it to be random do server.port = 0

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM