Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question

closed as off-topic by Rinzwind, Eric Carvalho, bodhi.zazen, Sneetsher, Lucio May 16 at 20:27

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." – Rinzwind, Eric Carvalho, bodhi.zazen, Sneetsher, Lucio
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
"chmod 777 -R /path/to/website/dir/" change that back to 755 for dirs and 644 for files please. To me this seems like a config issue on the system that holds the webserver. CentOS goes here: unix.stackexchange.com –  Rinzwind May 16 at 13:57
    
I am an ubuntu user and developed my site with the aid of ubuntu's apache and php. In this case i need to just locate my site on another machine running with other OS considered as almost the same. As i am not Unix & Linux Stack Exchange member and the answer was needed urgently, i have asked my question here. –  Hasan Siddiqov May 19 at 5:12
    
No, you need the server (=centos) to accept your request. –  Rinzwind May 19 at 6:31

1 Answer 1

up vote 0 down vote accepted

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.

share|improve this answer
    
We only deal with problems related to Ubuntu ;) –  Rinzwind May 16 at 13:59
    
Thanks, i have changed httpd.conf file uncommenting Virtualhosts section and now it is working. Appreciation! –  Hasan Siddiqov May 19 at 12:22

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