ProxyPass/ModProxy Issue
Dear Sir or Madam,
Please excuse the likely blatantly obvious solution to this problem, but I have been speaking with server support for 4 days on how to get this working and they haven't been able to solve or even tell me how I am meant to fix this issue.
Our server has cpanel/whm/easy_apache4 and has three domains that are currently being served by apache (They are have applications created under Create a New Account)
sitea.com
siteb.com
sitec.com
I have a docker image that is running a server (gunicorn/django) on localhost:8000 and have a fourth domain name that I want to make use of on the server. I have not created an account for it because it isn't serving files from public_html or anything like the other three.
sited.com
I was hoping apache would send traffic to localhost:8000 if the $host_name = sited.com
so in WHM I have added this (below) to the pre_virtual_host in the Include Editor
Home "Service Configuration "Apache Configuration "Include Editor
But it never seems like Apache reads the file and the the url for sited.com never resolves. (curl localhost:8000 on the server has a 200 response) but going to it via sited.com just gives the "SORRY! If you are the owner of this website, please contact your hosting provider" message. Serving the application on a port other than 80 works too but is non-ideal and would rather have apache act as the reverse proxy. Are there additional steps to take? Thank you, zizizizz
ServerName www.sited.com
ServerAlias sited.com
# Let apache serve static files
ProxyPreserveHost On
ProxyPass /static/ !
ProxyPass /media/ !
Alias /static/ /home/app/static/
Alias /media/ /home/app/media/
# Gunicorn handle the others
ProxyPass / http://localhost:8000/
ProxyPassReverse / http://localhost:8000/
But it never seems like Apache reads the file and the the url for sited.com never resolves. (curl localhost:8000 on the server has a 200 response) but going to it via sited.com just gives the "SORRY! If you are the owner of this website, please contact your hosting provider" message. Serving the application on a port other than 80 works too but is non-ideal and would rather have apache act as the reverse proxy. Are there additional steps to take? Thank you, zizizizz
Please sign in to leave a comment.
Comments
0 comments