Linux Wordpress在CentOS 6.2上不工作

Linux Wordpress在CentOS 6.2上不工作,linux,wordpress,centos,Linux,Wordpress,Centos,我正在尝试在CentOS 6.2上设置WordPress。我可以设置一切,包括MySQL、PHP和WordPress 这是我的httpd.config文件中/etc/httpd/config <VirtualHost *:80> ServerAdmin xxx@gmail.com DocumentRoot /var/www/html ServerName travellingrants ErrorLog /var/log/httpd/travellingrants-e

我正在尝试在
CentOS 6.2
上设置
WordPress
。我可以设置一切,包括
MySQL
、PHP和
WordPress

这是我的
httpd.config
文件中
/etc/httpd/config

<VirtualHost *:80>
  ServerAdmin xxx@gmail.com
  DocumentRoot /var/www/html
  ServerName travellingrants
  ErrorLog /var/log/httpd/travellingrants-error-log
  CustomLog /var/log/httpd/travellingrants-acces-log common
</VirtualHost>
这是我在错误日志文件中看到的

[Tue Nov 12 04:36:31 2013] [error] [client XXXX] File does not exist: /var/www/html/travellingrants/himachal-pradesh, referer: http://server-ip/travellingrants/
我已经在travellingrants目录下的
/var/www/html
下创建了WordPress flies。我不知道为什么会发生这种情况,因为我对Linux的知识有限

我尝试了
>设置status
,得到了这个结果

[root@li635-245 ~]# sestatus
SELinux status:                 disabled

非常感谢您的帮助。

我建议您检查.htaccess文件

问题可能是因为您在本地以不同的文件夹名称开发了站点

下面是Wordpress.htaccess文件的示例

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

重新启动发动机
重写基本/某些文件夹
重写规则^index\.php$-[L]
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则/some folder/index.php[L]

PS:如果您可以在html目录中看到某个文件夹,但浏览器无法看到,请将该文件夹更改为TravelingRants

,这是一个权限选项。Apache需要能够访问这些文件,以便能够向客户端(浏览器)提供这些文件

试试这个。 sudo chown-R apache:apache/var/www/html/travellingrant

注意:如果您需要通过FTP访问目录,则需要将chown(更改所有权)返回给FTP用户

你重新加载apache了吗? sudo服务httpd重新加载

也可以重新启动它


sudo服务httpd重新加载

Rudy Lee也可能是对的。发生这种情况的原因确实有很多。我也测试了这个选项,但没有成功。我用相同的文件夹名开发了这个网站,无论如何都会尝试按照你的方式进行。似乎这个解决方案不起作用。我不确定为什么会发生这种情况,但它说在中找不到请求URL的文件
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /some-folder
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /some-folder/index.php [L]
</IfModule>