Apache MySQL Question

I'm running Drupal 6.15 on Ubuntu Hardy with Apache and MySQL. My site comes up at its domain http://www.example.com but when I click on any posts or pages they look like they are going to go through but then they kick back to the main home page.

If I access the IP at http://xx.xxx.xxx.xx I see the Apache confirmation screen"It Works". Somehow I'm not connecting the database (?). I believe that I checked all my settings for Drupal, Apache, MySQL, etc. but somewhere I borked it. Given those symptoms where would you check for problems?

Here are a few of the last entries in the error log:

[Fri Mar 05 15:28:10 2010] [error] [client xx.xxx.xxx.xx] File does not exist: /srv/www/example.com/public_html/tracker

[Fri Mar 05 15:29:18 2010] [error] [client xx.xxx.xxx.xx] File does not exist: /srv/www/example.com/public_html/tracker

[Fri Mar 05 15:30:14 2010] [error] [client zz.zzz.zzz.zzz] File does not exist: /srv/www/example.com/public_html/popular

[Fri Mar 05 15:30:27 2010] [error] [client xx.xxx.xxx.xx] File does not exist: /srv/www/example.com/public_html/tracker

[Fri Mar 05 15:31:36 2010] [error] [client xx.xxx.xxx.xx] File does not exist: /srv/www/example.com/public_html/tracker

[Fri Mar 05 15:31:54 2010] [error] [client xx.xxx.xxx.xx] File does not exist: /srv/www/example.com/public_html/category

[Fri Mar 05 15:32:45 2010] [error] [client xx.xxx.xxx.xx] File does not exist: /srv/www/example.com/public_html/content

[Fri Mar 05 15:33:34 2010] [error] [client yyy.yyy.yy.yy] PHP Fatal error: Call to undefined function t() in /srv/www/example.com

/public_html/sites/all/modules/devel/performance/performance.module on line 167

Here is what the ports.conf looks like:

NameVirtualHost xx.xxx.xxx.xx:80

Listen 80

Listen 443

Here is the /etc/hosts file:

127.0.0.1 localhost

127.0.1.1 ubuntu

xx.xxx.xxx.xx examplehostname.example.com examplehostname

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

ff02::3 ip6-allhosts

Here is the Virtual Host file at etc/apache2/sites-available/example.com:

ServerAdmin admin@example.com

ServerName example.com

ServerAlias www.example.com

DocumentRoot /srv/www/example.com/public_html/

ErrorLog /srv/www/example.com/logs/error.log

CustomLog /srv/www/example.com/logs/access.log combined

The Linode manager looks accurate the Domain Zone, NS Records, A/AAAA entries, etc.

I've googled eveything I can think of that might affect this including file permissions, the Drupal settings file, the hostname, sessions, etc but nothing seems to solve it. Something tells me it is easy but my eyes are glazed over at this point. Any ideas?

2 Replies

Sounds like your .htaccess might be incorrect for drupal. Did you check that?

/srv/www/example.com/public_html/tracker

Do you actually have a folder named "/srv" on your root partition? Or should it be "/home/something/www/domain.com" etc.

Thanks for the feedback– I finally got it all working. These are the steps I took in case someone else runs into similar problems:

Based on this post-- http://wiki.apache.org/httpd/CommonMisconfigurations -- I made these changes to

/etc/apache2/sites-available/default:

  • changed DocumentRoot from /var/www/ to /srv/www/example.com/public_html

  • changed the Directory that referenced /var/www also to /srv/www/example.com/public_html

Based on this thread-- http://drupal.org/node/163915 -I made this change in both of the above locations:

  • changed AllowOverride None to AllowOverride All

Then I did a2enmod rewrite and restarted Apache and all was good.

Any questions or comments fire away.

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