3
我一直試圖在apache虛擬主機上安裝一個wordpress博客幾天無濟於事。請注意,虛擬主機配置工作得很好,因爲每個虛擬主機加載其各自的index.html或index.php。只有在Wordpress安裝時纔會得到任何迴應。我的conf文件看起來像Wordpress拒絕加載
<VirtualHost *:80>
# The ServerName directive sets the request scheme, hostname and port that
# the server uses to identify itself. This is used when creating
# redirection URLs. In the context of virtual hosts, the ServerName
# specifies what hostname must appear in the request's Host: header to
# match this virtual host. For the default virtual host (this file) this
# value is not decisive as it is used as a last resort host regardless.
# However, you must set it for any further virtual host explicitly.
ServerName example.com
ServerAlias www.example.com
ServerAdmin [email protected]
DocumentRoot /var/www/example
<Directory /var/www/example/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
# Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
# For most configuration files from conf-available/, which are
# enabled or disabled at a global level, it is possible to
# include a line for only one particular virtual host. For example the
# following line enables the CGI configuration for this host only
# after it has been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
博客是位於目錄/ var /網絡/例子,我的.htaccess文件看起來像
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
我啓用了mod_rewrite,所以我不知道是什麼問題是。檢查Apache的錯誤日誌什麼也沒有,訪問日誌總是顯示301的返回。任何想法?
那麼當您嘗試打開wordpress主頁時會發生什麼? –
@DusanBajic主頁永遠不會解決。它在幾分鐘後超時。 – user3423909
您需要先檢查基本知識。如果您刪除.htaccess並在網站根文件夾中創建一個簡單的index.html,您可以打開它嗎? –