Bringing Apache Up

Initially, we want to get apache, php5, and mysql running as quickly as we can. Since I’m trying to get down with code, the administrative stuff in a fresh install of xubuntu is beyond our scope. Later on, I’m absolutely positive I’ll blog some configuration details as we need them.

For now, this is what we needed:

$ sudo apt-get install libapache2-mod-php5 php5-mysql php-pgsql
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  apache2-mpm-prefork
Suggested packages:
  php-pear
The following NEW packages will be installed:
  apache2-mpm-prefork libapache2-mod-php5 php5-mysql php5-pgsql
0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
...

The installation process here seems to install and set up apache2-mpm-prefork:

 * Starting web server apache2
apache2: Could not reliably determine the server's fully 
qualified domain name, using 127.0.1.1 for ServerName

After that, when the php5-mysql and php5-pgsql packages loaded up, it reloaded the apache web server and gave the same message regarding ServerName.

xubuntu stores the web server files at /var/www. On Mac OS X, that’s /Library/WebServer/Documents/. Normally, when I’m coding on my MacBook Pro, I keep things I’m working on in ~/Sites/ and I’ve configured apache on my MacBook Pro to work like that. Most of the time, if you’re on a Mac, you just have to enable “Web Sharing” in your System Preferences under the Sharing panel.

For now, I’m doing the following commands on the dev box:

$ sudo addgroup web
$ sudo chgrp web /var/www
$ sudo usermod -a -G web myusername

This should let me edit files in /var/www.

This entry was posted in Development, Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *