Apache conf:
/etc/apache2/sites-available/andyrojaslab08.tk.conf
<VirtualHost *:80>
ServerName andyrojaslab08.tk
DocumentRoot /var/www/andyrojaslab08.tk/repo333
ProxyPreserveHost on
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Error Logs from Apache:
[proxy_http:error] [pid 7970:tid 140567970084416] [client 127.0.0.1:33122] AH01114: HTTP: failed to make connection to backend: 127.0.0.1
Connection refused AH00957: http: attempt to connect to 127.0.0.1:8080 (127.0.0.1) failed
etc/hosts:
127.0.0.1 andyrojaslab08.tk
127.0.1.1 andyrojaslab08.tk
192.168.139.128 andyrojaslab08.tk
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
proyect structure:
andy@andy-virtual-machine:/var/www/andyrojaslab08.tk/repo333$ ls
app.yaml HELP.md mvnw mvnw.cmd pom.xml src target
proyect path:
andy@andy-virtual-machine:/var/www/andyrojaslab08.tk$ ls
goodbst.jar Lab02-Rojas-0.0.1-SNAPSHOT.jar lab08xy.jar repo333
app.yaml from proyect:
runtime: java17
server.port=8080
resources from my proyect:
andy@andy-virtual-machine:/var/www/andyrojaslab08.tk/repo333/src/main/resources$ ls
application.properties static templates
application.properties:
spring.jpa.show-sql = true
spring.jpa.hibernate.ddl-auto = update
spring.datasource.url =jdbc:mysql://xxxxxx:3306/xxxxxx
spring.datasource.username =xxxxx
spring.datasource.password =xxxxx
spring.thymeleaf.prefix=classpath:/templates/
spring.thymeleaf.suffix=.html
server.port=8080
Error:
andy@andy-virtual-machine:/$ curl andyrojaslab08.tk
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Unavailable</title>
</head><body>
<h1>Service Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity problems. Please try again later.</p>
<hr>
<address>Apache/2.4.52 (Ubuntu) Server at andyrojaslab08.tk Port 80</address>
</body></html>
Error on web:
(I am using thymeleaf in html, and my html files are in src/main/resources/templates)
(I am using mysql database from the cloud, i already verified that the problem does not come from there)
(My css files are in src/main/resources/static)
(I am using apache2)
(i installed maven)