Monday, November 19, 2007

Apache, php, mysql continued

I added ServerName 127.0.0.1 to apache.conf in the /etc/apache2 directory ($APACHE_HOME ).
Changed the default port from 80 to 1080 in ports.conf. Note this is just so that http://localhost:1080 takes me to my home not http://localhost.

Stopping and starting apache
  • apache2ctl stop
  • apache2ctl start
Look up DocumentRoot in $APACHE_HOME/sites-available/default.Change the DocumentRoot to a directory that makes sense to you. Create an index.html file in this DocumentRoot directory.
Created a php file test.php in DocumentRoot.
Mine for instance has <?php phpinfo() ?>
Point your browser to http://localhost:1080/test.php to test.

http://localhost:1080/phpmyadmin takes you to the phpMyAdmin home page. Enter your userid and password that you created during the install.

Starting and Stopping mysql
mysqladmin -u root -p shutdown
mysqld & to startup.

Labels: , , ,