Added file to /var/www/html/ but not showing up. please help

I have added the files to /var/www/html/ but when I open http://45.56.112.34/ the testing page for Apache is keep showing up.

Anyone know why? Where is my web root path?

Thanks

4 Replies

Hi ruike,

You might want to provide a bit more information… what distribution are you using (debian, ubuntu, centos?), what files have you uploaded (directories/filenames might be handy).

Also, have you followed any guides to get this setup?

With more information, we should be able to help you figure this out. :)

Thanks virtualsid. I figured this out.

I have the new problem now. It seems like I can't run php files on my server.

I followed these guides and finished all the steps with not issues.

https://www.linode.com/docs/websites/la … n-centos-7">https://www.linode.com/docs/websites/lamp/lamp-server-on-centos-7

But when I run http://45.56.112.34/index.php, it didn't work.

Please help.

Thanks

Hi,

I don't use CentOS, so not sure why this wouldn't just work out of the box if you definitely followed those instructions on the guide.

Did you definitely restart your web server? 'sudo /bin/systemctl reload httpd', and did you definitely install PHP? 'sudo yum install php php-pear'? There should be no harm typing it again and restarting your web server if it did need installing.

The other thing to check is if this line is somewhere in your apache config:

 AddType application/x-httpd-php .php

And see if there is something similar to this too:

LoadModule php5_module /path/to/your/libphp5.so

I hope this gives you a pointer, and enough to help fix it.

Good luck!

Thank you very much virtualsid.

After I added AddType application/x-httpd-php .php in my apache config file. It works.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct