0

I have installed lamp on my new bought bandwagon host vps ip ,and edit an file named echo.php in /var/www/ .

The content in echo.php is:

<?php
    phpinfo();
?>

In the console , php /var/www/echo.php can list php info for me.
why http://vps_ip/echo.php (input in firefox) list nothing for me?

ssh  root@vps_ip:28662

Error info: ssh: could not resolve hostname

It is so strange that the vps_ip can be connected by putty!

  • Did you make sure that /var/www is the document root of your webserver? It used to be /var/www/html in apache. Also, is it giving you blank page or 404? – Sree Jun 18 '15 at 7:29
0

Check the apache error_log for issues. Generally either /var/log/apache/error_log or /var/log/httpd/error_log

Can you confirm that the path /var/www is the actual document root. I would suggest creating another file in plain text at that location and verify that it works. eg: echo "Test Me" >/var/www/test.txt

The plain text file will at least confirm that the folder/files are in the correct places and that you may have another problem with php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.