分页: 1 / 1

两个LAMP网站,本地访问正常,其他机器上访问一个正常,另外一个wordpress不能访问。

发表于 : 2008-05-05 16:15
shidelai
/var/www下面有两个网站,一个是自己做的(也有读取数据库的),另外一个是wordpress。本地访问都正常。
在另外的机子上通过
htpp://ip 正常
http://ip/mywedsit 正常
http://ip/wordpress 提示无法找到网页。

已经尝试过:
wp-config.php里面define('DB_HOST', 'localhost'); localhost 改成127.0.0.1。
将/etc/mysql/my.cnf 中 bind-address = 127.0.0.1 这一行注释掉。
都不行。

望各位帮助




wp-config.php代码如下:
<?php

// ** MySQL settings ** //

define('DB_NAME', 'wordpress'); // The name of the database

define('DB_USER', 'wordpress'); // Your MySQL username

define('DB_PASSWORD', 'wordpress123'); // ...and password

define('DB_HOST', 'localhost'); // 99% chance you won't need to change this value

define('DB_CHARSET', 'utf8');

define('DB_COLLATE', '');



// Change SECRET_KEY to a unique phrase. You won't have to remember it later,

// so make it long and complicated. You can visit http://api.wordpress.org/secret-key/1.0/

// to get a secret key generated for you, or just make something up.

define('SECRET_KEY', 'put your unique phrase here'); // Change this to a unique phrase.



// You can have multiple installations in one database if you give each a unique prefix

$table_prefix = 'wp_'; // Only numbers, letters, and underscores please!



// Change this to localize WordPress. A corresponding MO file for the

// chosen language must be installed to wp-content/languages.

// For example, install de.mo to wp-content/languages and set WPLANG to 'de'

// to enable German language support.

define ('WPLANG', '');



/* That's all, stop editing! Happy blogging. */



define('ABSPATH', dirname(__FILE__).'/');

require_once(ABSPATH.'wp-settings.php');

?>

发表于 : 2008-05-05 21:50
angelus
把两个工程目录的权限发上来看下,配置文件就不要写了,本地正确,配置基本就没问题

发表于 : 2008-05-06 11:12
shidelai
2个工程的权限我都是用一个语句同时设置为我登陆的用户和所在的组的.
sudo chown -R wisper /var/www/myflv
sudo chown -R wisper /var/www/wordpress

发表于 : 2008-05-06 17:10
angelus
用ls -l 把权限贴出来看下

发表于 : 2008-05-09 3:26
cjc1030
在wp-config.php下加入如下代码。改成自己的IP,我有两个局域网~~每换一次网,就要改一次。。

代码: 全选

// 如果您修改自己 Blog 的域名,可以通过下面两行代码进行硬设置

define('WP_SITEURL', 'http://172.23.30.54');
define('WP_HOME', 'http://172.23.30.54');

我也和你一样。。建个wordpress只有自己能访问,郁闷得几天睡不着
搞了几个通宵才发现。。唉~~

发表于 : 2008-05-09 5:58
hubert_star
观望中

发表于 : 2008-05-11 13:56
shidelai
-rw-r--r-- 1 root root 45 2008-05-03 22:50 index.html
drwxr-xr-x 8 wisper wisper 4096 2008-05-04 22:42 myflv1
lrwxrwxrwx 1 root root 21 2008-05-04 15:51 phpmyadmin -> /usr/share/phpmyadmin
drwxrwxrwx 5 wisper wisper 4096 2008-05-08 10:22 wordpress

我们用的都是电信拨号上网的,不是局域网内。

发表于 : 2008-05-11 14:21
shidelai
cjc1030 写了:在wp-config.php下加入如下代码。改成自己的IP,我有两个局域网~~每换一次网,就要改一次。。

代码: 全选

// 如果您修改自己 Blog 的域名,可以通过下面两行代码进行硬设置

define('WP_SITEURL', 'http://172.23.30.54');
define('WP_HOME', 'http://172.23.30.54');

我也和你一样。。建个wordpress只有自己能访问,郁闷得几天睡不着
搞了几个通宵才发现。。唉~~
加入
define('WP_SITEURL', 'http://220.184.188.147');
define('WP_HOME', 'http://220.184.188.147');
后本地访问都 localhost/wordpress 会跳转到 http://220.184.188.147/wordpress 并且没有网页框架, 所有内容按序上往下显示出来了。

发表于 : 2008-05-11 14:43
shidelai
解决了,应该是加
define('WP_SITEURL', 'http://220.184.188.147/wordpress');
define('WP_HOME', 'http://220.184.188.147/wordpress');