Monday, November 19, 2012

problem: apache downloads php file instead of executing AND how to change hosts file on Debian6


problem: apache downloads php file instead of executing



apache download php file instead executing
http://ubuntuforums.org/showthread.php?t=1361019
and then clear the local browser cache


Re: apache/php, serving php files for download instead of executing them

first, install libapache2-mod-php5

Code:
sudo apt-get install libapache2-mod-php5
Then enable it

Code:
sudo a2enmod php5
Restart paache

Code:
sudo service apache2 restart
Clear your cache on your browser, and re-load the page.








Changing Hosts file on Debian6
how to change hosts in debian6

http://www.cyberciti.biz/faq/debian-change-hostname-permanently/

Save and close the file. You may also need to edit the /etc/hosts file, enter:
# vi /etc/hosts
Find all references to server1 and replace with server2:
127.0.0.1 localhost
127.0.1.1 server2
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Save and close the file. Please note that the host name is usually set once at system startup in /etc/init.d/hostname.sh (normally by reading the contents of a file which contains the host name, e.g. /etc/hostname). Just type the following command to apply new changes without rebooting the server:
# /etc/init.d/hostname.sh start


http://www.hostfromabc.com/2011/11/09/change-host-name-debian-6-squeeze/



No comments:

Post a Comment