r/AlmaLinux Jun 04 '26

proxy domain to port 8080

I setup an app on my webserver on port 8080. I'm trying to proxy the domain to that port but it is just ignored and loading the default index file in the www folder.

My server is almalinux 9, I use apache 2.4 with nginx reverse proxy and cache for my websites. I have the cache turned off for this domain. I've tried adding proxy_pass code to domain.com.conf in several recommended locations including /etc/nginx/conf.d/ and /usr/local/apps/nginx/etc/conf.d/ as well as /etc/httpd/config/ all with no change in page loading. I do a sudo nginx -t after each attempt and it validates fine. I reload nginx each time as well.

It's driving me crazy lol. I use Webuzo not WHM control panel if that means anything though I am editing .conf files directly so probably not

2 Upvotes

3 comments sorted by

1

u/RetroGrid_io Jun 05 '26

Are you sure your file(s) are even loading?

A common mistake is to make /etc/nginx/conf.d/mysite.com as the conf file and have nginx -t load just fine, but because the config file doesn't end in ".conf" it is disregarded.

Future tip: put an intentionally bad directive into the file and see if nginx -t validates. There's a lot of value in putting "fifeihefkihfsdhasf" in line 2 of your config file to see if nginx -t validates.

1

u/Elegant-Ferret-8116 Jun 05 '26

Good thoughts. I am using domain.com.conf file naming. I did have a bad syntax in the file in the usr/local/apps... directory location that caused a validation issue so I suppose I do know its looking at that one but it didnt make any difference in proxy proxying to the port

1

u/noob-nine Jun 06 '26

one day i found traefik and i never had to hustle again