How to configure Apache?


#1

I need to configure Apache to make two WordPress plugins work.

1. WPML multilingual plugin

They advise…
[i]The easiest way is to have a single VirtualHost entry for all domains and use ServerAlias instructions to tell Apache to answer the different domains with the same virtual host.

For example:[/i]

[php]<VirtualHost *>
DocumentRoot /your_wp_install_directory/wordpress
ServerName www.english-domain.com
ServerAlias www.french-domain.fr

… your other stuff here …
[/php]

Read more: http://wpml.org/faq-tags/setup/

2. WP Super Cache

Apache must be configured to allow the modules above. If you receive a “500 internal error” when serving requests to anonymous users you need to dig into your Apache configuration. This configuration in my virtual host works for me:

[php]<Directory /home/www/> AllowOverride All [/php]

Read more: http://wordpress.org/extend/plugins/wp-super-cache/installation/

How do I do this?

Many thanks for your help :slight_smile:


#2

Shared hosting customers don’t have access to httpd.conf and must use .htaccess instead. I don’t believe in either case you can use the directives in your examples in .htaccess on dreamhost.

It is possible to edit httpd.conf on a VPS or Dedicated Server, however you must turn off dreamhost management in the panel so that your changes will not be overwritten.


#3

Neither of the configuration snippets you’ve posted are necessary on DreamHost.

The first one is handled by our panel. To create ServerAlias instructions, add the “aliased” domain to your panel as a Mirrored Domain, and set it to mirror the primary domain.

The second one is already in our configuration by default.


#4

Thanks Andrew,

I already thought that WP Super Cache may be in your configuration by default as you are recommending this plugin strongly. Unfortunately, I get blank pages when I try installing this plugin. Hence it maybe something else.

However, the mirrored domain has not worked 100% for a long while. I cannot see WordPress admin panel when I’m in the German sites. It also messes sometimes up in the admin area between the languages.

I have lived with this but as the site is awfully slow I believe that I have to address this at some stage.

From WPML I understand that the mirrored domain needs to be told that there is a WordPress installation on the other domain. How do I do that?