Could you run the command sudo a2enmod *proxy* and then attempt to restart the Apache server with sudo systemctl restart apache2 and let me know if it works?
Hello! I’m sorry for the delay in responding, could you run the command sudo apache2ctl -M and provide the output here please? I just want to check to make sure the right modules are enabled, since that is 99% likely to be causing the issue. Thanks!
Hey I’m sorry for the delay in my response, what about if you run the command sudo apache2ctl -t -D DUMP_MODULES, what do you get for your output then?
Could you share the output of the command sudo cat /etc/apache2/apache.conf with me by any chance? According to my research, this seems to have something to do with the way that the .htaccess file system is setup and interpreted, and this file should have the configuration information in it.
Well I think that is the issue, if your missing the entire main Apache web server configuration file, then there is nothing to tell Apache what it is and isn’t allowed to do globally. Could you run the command sudo ls -alh /etc/apache2/ and provide the output? I just want to check to see what all is present in your servers directory so we can get everything that is missing where it needs to go. Thanks!
I just realized I made a mistake in the command, that explains the issue. It’s so different typing it out in instructions instead of doing it myself, its such a second nature thing to me now that I don’t normally actually think about the commands I’m using. I’m so sorry for the confusion. Could you provide the output of the correct command, which is sudo cat /etc/apache2/apache2.conf please?
Thank you so much! I believe I see the issue, which is that the Apache VirtualHost configuration file is attempting to use mod_proxy rules while there is no document root set, which basically means that the server doesn’t know if it is supposed to allow or deny the rules from being applied to the website, because it doesn’t know where in the server it is. Basically, you should be able to (hopefully) fix this by adding the following line to your VirtualHost configuration file we created above. DocumentRoot /var/www/html
You can see where to put this in the file from here where it is clearly highlighted in green, or from the screenshot attached which is also the same thing.
Dear @XxLilBoPeepsxX ,
I would like to reply you that when I add DocumentRoot /var/www/html, it still have problem of running sudo apachectl enmod mod_rewrite mod_proxy mod_proxy_http mod_proxy_wstunnel. Please refer to below images. Thank you.
Dear @XxLilBoPeepsxX,
I would like to reply you that when I run sudo a2enmod rewrite proxy proxy_http proxy_wstunnel and sudo systemctl reload apache2, it still have errors.
That error means that you never started the Apache service, you can start the Apache web server with the command sudo systemctl enable apache2 && sudo systemctl start apache2