Configure VirtualHost for a perfect Wordpress Environment

Locke picture Locke · Apr 12, 2013 · Viewed 45.5k times · Source

I'm trying to install wordpress in a Cloud Server with rackspace.

But my lack of knowledge in server configuration (LAMP , etc) is making me do a lot of miss configurations .

First I think the .httaccess is not allow. Second the update Wordpress and plugins featured is not allow Third may be more numbers...

let me show my virtualhost file:

    <VirtualHost *:80>
  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin [email protected]
  ServerName  my.com
  ServerAlias www.my.com


  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html, index.php
  DocumentRoot /home/devdreams/domains/my.com/public


  # Custom log file locations
  LogLevel warn
  ErrorLog  /home/devdreams/domains/my.com/log/error.log
  CustomLog /home/devdreams/domains/my.com/log/access.log combined

    <Directory />
      Options FollowSymLinks
      AllowOverride All
      Order deny,allow
      Deny from all
      Satisfy all
    </Directory>

  AccessFileName .htaccess


    <Directory /home/devdreams/domains/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>


    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    <Directory "/usr/lib/cgi-bin">
        AllowOverride None
        Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
        Order allow,deny
        Allow from all
    </Directory>

    Alias /doc/ "/usr/share/doc/"

    <Directory "/usr/share/doc/">
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    </Directory>

    LoadModule rewrite_module modules/mod_rewrite.so


</VirtualHost>

Could somebody help me configure my VH for a wordpress environment

thaaks

Answer

Tony picture Tony · Apr 12, 2013

Your .htaccess will not work because you have AllowOverride None, change that to AllowOverride All

In terms of being able to update Wordpress and the plugins you will need to change the ownership of the files/directories to the user that is running the webserver. For example: chown -R apache:apache /home/devdreams/domains/