So I am using a web app when users can connect their custom domain to their profiles.
My configuration majorly includes Apache, PHP and MySQL
So I changed my default port 80 to 8080 - this is my apache port file
If you just change the port or add more ports here, you will likely also
# If you just change the port or add more ports here, you will likely also
# have to change the VirtualHost statement in
# /etc/apache2/sites-enabled/000-default.conf
Listen 8080
# <IfModule ssl_module>
# Listen 443
# </IfModule>
# <IfModule mod_gnutls.c>
# Listen 443
# </IfModule>
Installed caddy on my server and edited my caddy file to use my domain name
{
email myemail
acme_ca https://acme-staging-v02.api.letsencrypt.org/directory
}
mydomain {
reverse_proxy / localhost:8080
}
Correct me if I need to add something in caddy file, Im pretty new to caddy server. Also am I point it correctly to my apache port?
Config.json:
{
"apps": {
"tls": {
"automation": {
"policies": [
{
"issuer": {
"module": "acme",
"email": "myemail"
},
"on_demand": true
}
],
"on_demand": {
"rate_limit": {
"interval": "5m",
"burst": 100
}
}
}
},
"http": {
"http_port": 80,
"https_port": 443,
"servers": {
"tiendas": {
"listen": [":80", ":443"],
"max_header_bytes": 41943040,
"routes": [
{
"handle": [
{
"handler": "reverse_proxy",
"upstreams": [
{
"dial": "localhost:8080"
}
]
}
],
"terminal": true
}
]
}
}
}
}
}
For now I did not use “ask” directive as I dont exactly know what url to pass in and how it performs!
So this has been my configuration so far as Apache behind caddy reverse proxy, but when I visit my main domain I only the plain html is loaded and css/js are not loaded.
Also my other pages are not accessible, only main domain. And when I map my other domain(users custom domain), it doesn’t load.
Can someone please help, I can really use some help!!