I need to locate website files to remote machine which runs CentOS with no graphical user interface. My machine runs ubuntu. Is there a way to check configuration of installed apache and php or how to configure them in order to run my site? I have been told that CentOS uses almost the same commands with ubuntu as it is considered one of linux based system. I had already copied all my website files to remote machine's /var/www/html directory. I have tried following:
- open browse from my local machine and try to open that remote addres/website/directory/ error: requested url couldn't be retrieved.
- chmod 777 -R /path/to/website/dir/
but no use. website is not working, so i think i have to configure apache and php together.
31 Answer
Ubuntu and CentOS use different configurations and paths for Apache and PHP for example Ubuntu lists each virtualhost in the /etc/apache2/sites-available and CentOS stores the virtualhost config in the main /etc/httpd/httpd.conf file.
In order to setup the Apache config on CentOS you need to copy the content of the /etc/apache2/sites-available/your-site and paste it in the /etc/httpd/httpd.conf file and restart Apache on CentOS
For PHP you need to compare the configs from Ubuntu located at /etc/php5/apache2/php.ini with the one from CentOS located at /etc/php.ini.
2