I'm a currently trying to use ProxyPass to change a request to my server into a request to a different API server. However, all of the requests seem to be going to the Apache start page and not being changed at all.
I had been using this guide in order to try and set up the server, which is where I got the below conf file from.
Here is my current 000-default.conf file in the sites-enabled directory:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<VirtualHost *:*>
ProxyPreserveHost On
ProxyPass "/" "https://api.net/example/:80"
ProxyPassReverse "/" "https://api.net/example/:80"
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ServerName http://52.89.79.213/
</VirtualHost>
I was reading this answer and tried to follow the given answer by changing the ServerName in my new VirtualHost to the IP address of my server, and I also tried running the command a2dissite default, but I get the message "Site default does not exist!".
What could be the problem with my configuration? Should I remove the first VirtualHost brackets, as they are just for the Apache start page? When I do this, I get an internal server error. Any tips would be greatly appreciated!