即使我更改了文档根目录,Apache也会显示它的工作页面

时间:2015-06-28 18:39:09

标签: windows wordpress apache ubuntu-server

我的问题,就是当我把 wordpress.local.fr ,显示我的wordpress的欢迎页面时,它向我显示它总是有用的页面。

enter image description here

但是当我 wordpress.local.fr/wordpress 时,它可以正常工作

enter image description here

这就是我所做的:

Ip Adresse of ubuntu server:192.168.52.130

在etc / apache2 / sites-available / wordpress

<VirtualHost *:80>
    ServerAdmin wordpress.local.fr
    DocumentRoot /var/www/wordpress
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

etc / hosts:

192.168.52.130 wordpress.local.fr
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

托管窗口:

192.168.52.130 wordpress.local.fr

wordpress文件夹包含我的所有文件,没有子文件夹,我使用 samba 在windows和ubuntu服务器之间共享/ var / www /

[Share]
  comment = Shared
  path    = /var/www/
  browseable = yes
  read only = no
  guest ok = yes
  writeable = yes

我不知道自己哪里出错了。 我能检查和改变什么?

修改

我试图在fileindex文件夹中只创建一个txt文件,而不是我的wordpress项目,并且在DocumentRoot / var / www / fileindex中制作它总是我有它的工作页面所以不考虑DocumentRoot

我的htaccess文件(在我的wordpress /文件夹中)是:

# BEGIN WordPress
# END WordPress

我已经编辑了我的htaccess文件(在我的wordpress /文件夹中)。对此:

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

我已将serverAdmin更改为serverName,如下所示:

<VirtualHost *:80>
    ServerName wordpress.local.fr
    DocumentRoot /var/www/wordpress/
    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

重启我的apache之后仍然存在同样的问题

先谢谢

2 个答案:

答案 0 :(得分:2)

在你的配置中我看到了

a=1:35;

for i = a
  b=10+a;
end

filename = 'testdata.xlsx';
A = vertcat('Example', 'Results', num2cell(b'));
sheet = 1;
xlRange = 'B1';
xlswrite(filename,A,sheet,xlRange)

ServerAdmin指令用于在Apache遇到错误时接收电子邮件,它应该是

ServerAdmin wordpress.local.fr

答案 1 :(得分:0)

您似乎需要更新.htaccess文件(在wordpress/文件夹中)。

RewriteBase/更改为/wordpress/

玩得开心!

相关问题