我正在ubuntu服务器12.04.3 LTS上部署wordpress。
我在/etc/apache2/ports.conf
中创建了一个虚拟主机NameVirtualHost *:82 听82
在我的网站中,我有一个wordpress文件如下:
<VirtualHost *:82>
ServerAdmin webmaster@localhost
DocumentRoot /home/rex/sites/wordpress
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /home/rex/sites/wordpress>
Options FollowSymLinks
AllowOverride 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>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
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>
</VirtualHost>
在我的〜/ sites / wordpress / .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
我遇到的问题是,当我在浏览器中键入我的服务器IP和端口号192.168.1.61:82时,我被重定向到192.168.1.61,并显示错误消息“禁止您没有权限访问/在此服务器上。“
有什么想法吗?感谢。
答案 0 :(得分:0)
尝试在ServerAdmin
行下面添加此内容:
ServerName 192.168.1.61