Hello. In short: I registered on https://cp.hts.ru/ after receiving a virtual hosting (no root), threw ssh in / home / srv75429 / spring boot jar-nickname, downloaded java, launched it with the command ./java -jar spring.jar , the rules started up everything is fine (the remote database has also been updated) and then I go to my website srv75429.ht-test.ru but the server does not see, then I realized that all requests go to the common ip address on port 80 and it then redirects to my folder / home / srv75429 / which is my site, and the site is not there because it is generated by spring boot on port 8080, in Google I found out that I need to redirect to port 8080 via ng inx, but I don’t have root rights, I decided to compile nginx from source, but there it needs c compiler, I started compiling c compiler from source, but there is also some c needed and you can get it with yum command with root rights. I solve the problem for 4 days. maybe something is wrong. With the remote installation of the java server I come across for the first time.

Properties code:

server.address = localhost server.contextPath=/home/srv75429/ spring.datasource.url = jdbc:mysql://xxxxxx/mysql spring.datasource.username = xxxxxxxxx spring.datasource.password = xxxxxxxxx spring.datasource.testWhileIdle = true spring.datasource.validationQuery = SELECT 1 spring.jpa.show-sql = true spring.jpa.hibernate.ddl-auto = update spring.jpa.hibernate.naming-strategy = org.hibernate.cfg.ImprovedNamingStrategy spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect 

MainController code

 import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class MainController { @RequestMapping("/") @ResponseBody public String index() { return "<iframe width=\"560\" height=\"315\" src=\"https://www.youtube.com/embed/xBd0qtGaNLY\" frameborder=\"0\" allowfullscreen></iframe>"; } } 

I would be grateful for any help!

  • And on port 80 tried embedded tomcat to start? Try to specify server.address = srv75429.ht-test.ru and server.port = 80 or make 8080 port forwarding - rvit34
  • Hi, with 'server.address = srv75429.ht-test.ru' beats out 'java.net.BindException: Cannot assign the requested address' with port 80 is also Exception because port 80 is busy, how to make forwarding port 8080 I do not know, tell me if you know or throw a link to read. Thank! - Sergey
  • @rvit to take port 80 requires root rights. nothing comes to mind where the rights of the root would not be needed - Nikita Gordeyev
  • You need not a hosting, but a full-fledged VPS. - Nofate
  • When I installed the server on a hosting and connected it to my domain, I coordinated such an installation with the technical support of the hosting. These guys took on some work and helped set things up. Among other things, they recommended what instructions to read. As a rule, hosting is configured to work with the public_html folder, if you install your server, this should be changed. If you have the opportunity to try to contact technical support. - Kirill Ch

0