LAMP and WordPress not quite right

Hello

I am new to VPS and hope that this might give a hint of the problem to someone - if not I will supply more info.

Using Ubuntu 8.04 LTS Apache 2 PHP 5 and MySQL 5 all just installed.

Have set up two domains and used this tutorial http://www.debian-administration.org/articles/412 for Apache to host multiple sites.

Thought I would install WordPress as easy test to see if things OK and all seems well, but:-

1. No confirmation email sent on install with password, as is usual.

2. Unless the full path and file extension is qualified, with ending "index.php" etc (WordPress just does "/directory/date/filename/" or similar usually) get a page not found error or a file directory list like:

Parent Directory -

admin-ajax.php 29-Jul-2008 18:15 18K

admin-footer.php 29-Feb-2008 18:27 571

admin-functions.php 21-Mar-2008 05:29 182

admin-header.php 23-Jul-2008 14:52 6.5K

admin-post.php 11-Jul-2008 16:24 432

admin.php 11-Jul-2008 16:24 3.0K

async-upload.php 24-Jun-2008 18:19 1.4K

categories.php 13-Jun-2008 19:52 5.3K

comment.php 28-May-2008 11:37 6.8K

By typing in the file names, it is possible to use admin and see the site, but not by navigating the links as supplied.

I am hoping this will make some sense to someone and it will be a stupid error or forgetfulness on my part.

Many thanks for any help on this.

9 Replies

1. In order for your server to send confirmation emails, a Mail Transfer Agent (MTA) needs to be installed on it. A quick apt-get install postfix will do the trick, but you'll need to do a little more work in order to make your MTA secure enough. (Otherwise somebody might use your server to send spam, etc.)

2. You need modrewrite in order for WordPress permalinks to work as they should. I don't think modrewrite is enabled by default in Ubuntu Hardy, but a2enmod rewrite /etc/init.d/apache2 force-reload should be enough to get it working.

Thank you Hybinet.

I think it is time to show my complete ignorance and allow myself to become a public laughing stock.

I get this:

Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName [date] [warn] Name VirtualHost *:0 has no VirtualHosts

and a screen which says this:

"Please select mailserver type that best fits your needs…"

but I am unable to make a selection, as there is just a sort of reddish smear to the right of the screen, which I suppose is where I would select, but must have something missing. I am using Putty.

It then says:

"preconfiguring packages… "

and hangs.

To make matters worse, when I look in etc/apache2/available-domains/… the sites I have listed as www.domain1.com and www.doamin2.com are shown as "MS-DOS application files".

Could I please now claim my prize as being the most stupid Linode user?

Thank you.

Don't know much about Ubuntu, but I use Debian so it should be very close. Anyways. When I setup Apache on my Linode I could not view the default site with the "It Works!" tag. Why? Because it was running local and could not be accessed from the outside.

So. I think. (i use the lazyway webmin btw) you must create/edit your vhost/httpd.conf file for Apache. And then (also make sure mod rewrite is enabled) restart Apache as someone else mentioned in earlier post in order to access at least the default site.

Myself I created multiple Vhost's and for each domain I create it's own directory in var/www/sites/mycoolsite.com and then make its document root and ip known in the httpd.conf file. Afterwards it required me to restart Apache again.

About postfix. I use this too. And I have it setup to another account on the server. Sending email to root is not good plan. So I set limited user account for basic task and read mail.

Have no clue about the reason why you get the smear when viewing postfix initial configuration though. I have noticed this when using another terminal client, but with the default settings using putty it should work fine. Are you using the latest version?

As for the "smear", don't know what's causing it, but try using Linode's Ajax console instead of Putty. You have to select "Internet site" as your mailserver type. If you can't see anything, just press Enter and "Internet site" will be selected by default. Keep pressing Enter until you're done. This of course enters default values into everything, but then you can edit the config files by hand….

In order to get rid of the "can't determine fully qualified domain name" warning, you have to set up the server's hostname. Google is your friend here.

Find where in your config files you have the line "NameVirtualHost *:0", and change it to "NameVirtualHost *:80". Websites are supposed to be on port 80, not port 0.

After each change, run "/etc/init.d/apache2 force-reload" to apply your changes. Nothing takes effect until you do so.

The reason your config files show up as "MS-DOS app files", I suppose, is simply because the filenames end in ".com". That used to be the extension for a lot of MS-DOS apps. Apache doesn't care about the filenames, so don't worry about this.

Of course, if you really screw up your server, you can erase it and start new with just a few clicks. Linode rocks! Next time, try a following a different tutorial such as http://www.howtoforge.com/perfect-server-ubuntu8.04-lts (skip the installation part).

Thank you to hybinet and mdev for taking the time and trouble to help with this.

I had thought that perhaps some people's brains (mine) were just not made to do things like this, but I have learnt a lot today - not least of which being to read and write things down.

I am going to set up another Ubuntu and follow the HowToForge instructions.

Many thanks and fingers crossed!

Postfix is needed if you want to receive emails. It has nothing to do with sending them.

@OverlordQ:

Postfix is needed if you want to receive emails. It has nothing to do with sending them.

No, that is false. Postfix is also used for sending mails out onto the Internet. In this case, the OP needs to use some MTA - Postfix is an excellent choice.

As for having a MTA for things like Blogs, Forums and what not I'd say use an email service. I'm running Drupal for forums/blogs and for everything I use my email provider instead of my Linode. I have a for fee email provider but you can always use gmail and other free services out there.

This cuts the risks and other hassles unless you want to run your own mail server.

Anyway just my two bits for what it's worth.

I use a wordpress plugin that allows me to send via SMTP. Just go to the plugin repository and search SMTP..

I have some articles for ubuntu here:

http://www.routermods.com/ubuntu

My blog is on my linode all of those articles are problems I have run into, they should assist your with configuring your node correctly to use wordpress and fix its underlying issues.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct