两个LAMP网站,本地访问正常,其他机器上访问一个正常,另外一个wordpress不能访问。
发表于 : 2008-05-05 16:15
/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');
?>
在另外的机子上通过
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');
?>