Ubuntu users in Ontario, Canada?

geo yaktur at yahoo.com
Wed Jun 25 01:37:27 UTC 2008


I can't restart Apache now. Something has gotten messed up!

I tried:

root at Dell1:~$ /etc/init.d/apache2 restart
 * Restarting web server apache2
Syntax error on line 4 of /etc/apache2/mods-enabled/dir.conf:
Invalid command 'index.xhtml', perhaps misspelled or defined by a module not included in the server configuration
                                                                         [fail]
root at Dell1:~$

The website is down (I didn't have any content but that's not the point)

Nothing is working with it. I'm not sitting here with a smile on my face because now it's gone all wrong and won't restart and I don't even understand what it's complaining about (the error message, what Syntax error? I don't understand)?

geo

--- On Tue, 6/24/08, volksman <v0lksman69 at gmail.com> wrote:
From: volksman <v0lksman69 at gmail.com>
Subject: Re: Ubuntu users in Ontario, Canada?
To: "The Canadian Ubuntu Users Community" <ubuntu-ca at lists.ubuntu.com>
Cc: yaktur at yahoo.com
Date: Tuesday, June 24, 2008, 10:11 AM

Geo:

Firstly let me just say, coming into any group of volunteers who are 
more than willing to help you work through your problems and constantly 
bashing the product the volunteers are willing to support is not good 
protocol.  We all started somewhere, looking at this OS (or any OS for 
that matter) with dropped jaw wondering where the hell to start.  We all 
learnt this crap for one reason or another so it is very possible for 
you to learn it too.  Remember what it was like when you got your first 
copy of Windows95 and tried to figure out how to get dial up networking 
going?  So relax.  It's nothing personal.  You can't just jump in and
be 
a pro.

Secondly you are bashing Ubuntu for not having a point and click web 
server solution that caters to -your- needs.  Have you tried to do any 
of this under Windows?  It would be just as confusing to you.  You 
(apparently) don't have the knowledge or understanding of how web pages 
are served, and that web serving depends on a lot of smaller 
applications to work together.  Nothing wrong with that, however this 
would be the case regardless of the OS running the software.

Thirdly as Alfred mentioned:  Apache big chew, PHP big chew, mySQL big 
chew, Joomla big chew.  All very intensive programs with a lot to learn 
to feel comfortable.

So, with that said let's move on to the help and forget the trash talk 
for a bit.

Here are a few steps to take to get a LAMP server with Joomla setup.  
You will be on your own with Joomla as I've never used it.  However we 
should at the very least be able to get it installed.  This will also 
correct any problems you may have introduced with your magical Apache 
install so follow every step even if you think it's already done.... :)

Start by installing mysql and getting it configured for use (taken and 
clarified from http://howtoforge.com/perfect_server_ubuntu7.10_p6):

In a terminal run:

sudo apt-get install mysql-server mysql-client libmysqlclient15-dev

You will be prompted for the mysql root user password.  Leave it blank 
if you want however I would suggest you enter a password, keep it handy.

Super.  mySQL is installed and should be running.

Now lets get Apache and PHP installed:

Again in a terminal run (all one line!!!!)

sudo apt-get install apache2 apache2-doc apache2-mpm-prefork 
apache2-utils libexpat1 ssl-cert libapache2-mod-php5 php5 php5-common 
php5-curl php5-dev php5-gd php5-idn php-pear php5-imagick php5-imap 
php5-json php5-mcrypt php5-memcache php5-mhash php5-ming php5-mysql 
php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy 
php5-xmlrpc php5-xsl phpmyadmin

You will be asked the following question:

Continue installing libc-client without Maildir support? <-- Yes

Next we need to edit /etc/apache2/mods-available/dir.conf:

gksudo gedit /etc/apache2/mods-available/dir.conf

and change the file to look like this:

<IfModule mod_dir.c>

          #DirectoryIndex index.html index.cgi index.pl index.php 
index.xhtml
          DirectoryIndex index.html index.htm index.shtml index.cgi 
index.php index.php3 index.pl index.xhtml

</IfModule>

Now we have to enable some Apache modules (SSL, rewrite, suexec, and 
include).

in a terminal run these one by one:

a2enmod ssl
a2enmod rewrite
a2enmod suexec
a2enmod include
/etc/init.d/apache2 force-reload

Super!  Apache, PHP and phpmyadmin are now installed.  Only a few more 
steps.

Now.  Let's download the Joomla package and get it unpacked.  From a 
terminal type:

cd
mkdir joomla
cd joomla
wget 
http://joomlacode.org/gf/download/frsrelease/6828/22537/Joomla_1.0.15-Stable-Full_Package.tar.gz
tar zxvf Joomla_1.0.15-Stable-Full_Package.tar.gz

This has downloaded Joomla and unpacked it in your home directory in a 
sub directory called joomla.  We need to move that to your web servers 
document root (IE the directory that the web server knows to serve.  By 
default this is /var/www so in a terminal type the following:

sudo cp -r ~/joomla/* /var/www/.

At this point you should be able to call up the install page in a 
browser.  You will need to fill in some blanks here for me.  In your 
browser browse to:

http://IPOFYOURSERVER/

You should see a Joomla pre-install check page.  It should complain 
about some permissions.  So let's fix those.  You will need to find out 
what user Apache runs as (I may have changed it on my server so you will 
need to verify this).  In a terminal run:

ps aux|grep apache

Note the very first column.  It will either be 'nobody' or
'apache' 
(ignore the one line that has root as the user..).  So if it is nobody 
then type this in a terminal:

sudo chgrp -R nogroup /var/www
sudo chmod -R g+w /var/www

If the user that runs apache was apache then run this:

sudo chgrp -R apache /var/www
sudo chmod -R g+w /var/www

Now hit the "Check Again" button in your browser on the pre-check
page.  
The only thing that should still not be writeable is configuration.php.  
That's fine we will deal with that later.  Everything else should be 
green.  Now hit the "Next" button.  Accept the license by hitting 
"Next".  Now it will ask about the database.  So here we need to
create 
a new DB for Joomla.  In a new browser open 
http://IPOFSERVER/phpmyadmin  again I may have changed my config so this 
may or may not work for you.  Just let me know and I will help you 
figure that out.  If you can get in then we need to enter 'joomla' or 
whatever you want to call the DB in the "Create a new Database" field
on 
the main page.  Leave it as Collation and hit submit.  This will create 
a blank DB for you.  Now we need to create a username and password to 
access that DB.  So hit the "SQL" tab at the top of the page you are 
redirected to and put this in the text box:

grant all privileges on joomla.* to 'joomlaadmin'@'localhost'
identified 
by 'passwordofyourchoosing';

Ok.  A small explanation: joomla.* would be whatever database name you 
decided in the previous step.  So if you called it mushrooms then 
mushrooms.* would be the first piece.  The second part is a username of 
your choosing.  So lets use another example of 
'mushroomsadmin'@'localhost' and the last part is a password of
your 
choosing.  When you have the line the way you want hit submit.   It 
should say it was successful.

Now go back to the browser that has the Joomla install and enter the 
following:

hostname:  localhost
username:  joomlaadmin (or whatever you decided on)
password: yourpassword
database name:  joomla (or again whatever you decided on)

Leave the rest as they are and hit Next.

Next it asks for a site name.  I assume this is a pretty name that can 
be changed later in the config.  So enter whatever you want in this 
field and hit next.

So this page I would leave the first two fields alone for now.  Should 
have been able to guess the right info.  This can also be modified later.

Enter your e-mail address and write down or change the admin password.  
Then where it talks about permissions hit the button beside "CHMOD files 
to" and put a check in both sections to allow group to write.  Hit Next.

You should be on Step 4 now.  So here it tells us to remove the install 
dir and gives us our config file.  So let's put the config file in place 
first.  In a terminal type:

gksudo gedit /var/www/configuration.php

Copy the entire text on the web page enclosed in <?php ............ ?> 
and paste it into the window that just opened.  Then save and exit.  
Next in a terminal run this:

sudo rm -rf /var/www/installation   <- carefull with that command make 
sure that you type it correct.  It can be dangerous.

SUPER!!! WE ARE DONE!

At this point you can hit the two buttons on that last Joomla page 
(either View Site or Administer).  Bookmark both so you know how to get 
to either one.

That's it!  You are now on your own with the setup of your page.  Joomla 
and all it's support apps are installed and ready to go.  You may also 
want to read up on Joomla security as the permissions may not be the 
best (they let us setup joomla but putting it into the wild like that 
MAY be a problem).

If you have any problems at any step above let me know and I will break 
it down a little more for you.

Hope that helps (and keeps you busy! :)  ).


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-ca/attachments/20080624/fe30409f/attachment.html>


More information about the ubuntu-ca mailing list