Php not working with apache

September 17, 2015 3.4k views
PHP Apache


I installed php and apache. My site is working fine on GoDaddy but when i copied my public_html folder to /var/www/site1. It is not working. I have also changed the domain name to IP and accessing it via IP but it is not picking up. I can see the centos apache testing page. What could be the problem?

1 Answer

Good to have you at digital ocean. Because all DO droplets are unmanaged, you need to setup the whole system yourself (if you didn’t use a app setup). So after you installed all the prerequisites (apache, php5-(cli,mysql) etc.) you need to configure them.
To get a website working, your server needs to handle the domain you would like to use. Apache does this, using VHOST configurations. I recently answered another topic about this, you can find more information there: LINK
If you got any more problems, I’ll be happy to answer your post here. If you got it working, please give a report here and a like :)

Have another answer? Share your knowledge.