Can't Find PHP File After Switching Ports!!!!

Posted September 3, 2018 817 views
ApacheUbuntu 16.04

I am using this tutorial: Everything goes well until Step Five. I am able to load my website, but when I try to load the PHP document (, I can’t find it! I only lost track of it once I switched my ports and what not, but I tried creating a new PHP document and I sitll can not find it!. Does anyone know how I can fix this? It says my requested URL was not found.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey friend!

It will be difficult to know the solution to this externally. The best way to go about it is to break down what is happening and why. If /info.php gives a 404 error, then the web server is not looking for it in the place that you think it should be. Follow your path in the configuration. What virtual host is set to point to what document root, and does that document root contain the file? Are you redirecting to another virtual host that then points to another document root that does not contain the file? Is the web server you are editing the configuration of actually listening on the relevant port?

It is a logic issue, and the specifics of that logic are doing to be very situational. Review your logic a few times and you may see an error in it.


  • It’s hard to describe how I went wrong, but the issue was because of me. I have fixed it. Thank you for your advice. Sometimes you just gotta start from square one and re-look over stuff.