为完美的Wordpress环境配置VirtualHost

Loc*_*cke 4 wordpress apache2 virtualhost httpd.conf rackspace

我正在尝试在带有rackspace的云服务器中安装wordpress.

但是我缺乏服务器配置(LAMP等)的知识让我做了很多错过配置.

首先,我认为.httaccess是不允许的.第二个更新Wordpress和插件功能不允许第三个可能更多的数字...

让我展示我的虚拟主机文件:

    <VirtualHost *:80>
  # Admin email, Server Name (domain name) and any aliases
  ServerAdmin adrian@my.com
  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>
Run Code Online (Sandbox Code Playgroud)

有人可以帮我配置我的VH用于wordpress环境

thaaks

小智 7

您的.htaccess将无效,因为您已将其AllowOverride None更改为AllowOverride All

在能够更新Wordpress和插件方面,您需要将文件/目录的所有权更改为运行Web服务器的用户.例如: chown -R apache:apache /home/devdreams/domains/