无法使用ip-address访问Intranet网页(在xampp上运行wordpress)

时间:2011-04-27 06:07:03

标签: wordpress ip-address xampp lan

我在我办公室的一台PC(Windows XP)上安装了xampp和wordpress 目前,我可以通过指定网络服务器的pcname来访问我的网页。例如http:// pcname
我无法使用网络服务器的ip-address访问它 关于如何使用ip-address访问它的任何想法,例如http://192.xx.xx.xx

更多细节:
1.我可以在网络服务器中使用http:// localhost / xampp /或http://127.0.0.1/xampp/本地访问xampp主页,但无法通过指定其IP地址访问它(http:// 192 .xx.xx.xx / xampp /)本地。从http:// pcname / xampp /。中访问时,我可以看到安全页面 2.我在C:\ xampp \ htdocs根目录中安装了wordpress,并在“设置” - “常规”菜单中将“WordPress地址(URL)”和“站点地址(URL)”设置为http:// pcname 。
3.网络中的其他PC可以访问Web服务器中的共享文件夹(可以通过在Windows资源管理器上指定\ pcname或\ 192.xx.xx.xx来访问PC。
4.已在Web服务器上禁用防火墙 5.网络服务器有静态IP地址
任何帮助表示赞赏。

1 个答案:

答案 0 :(得分:2)

试试这个:

停止apache服务器。 在文本编辑器中打开xampp \ apache \ conf \ extra \ httpd-xampp.conf并在最后添加/更改以下内容:

#
# New XAMPP security concept
#

# Close XAMPP security section here 
<LocationMatch "^/(?i:(?:security))">
   Order deny,allow
   #Deny from all
   Allow from ::1 127.0.0.0/8 
   ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

# Close XAMPP sites here
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))">
   Order deny,allow
   #Deny from all
   Allow from ::1 127.0.0.0/8 
   ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>

重启Apache服务器。 如果这解决了任何问题,那么您必须修改这些安全设置,因为您的系统现在不安全。如果这对您没有任何作用,请再次删除它。我不能告诉你如何修改安全设置,现在问别人。

  

2.我在C:\ xampp \ htdocs根目录中安装了wordpress,并将“WordPress地址&gt;(URL)”和“站点地址(URL)”设置为“设置”中的http:// pcname - “常规”菜单。

现在,如果这意味着您要更改Wordpress使用的URL(从// pcname到IP地址,那么您有两种方法可以让wordpress再次运行:
1.从头开始重新开始 2.在所有文件数据库中手动更改对旧URL的所有引用。

无论如何,这是我的经验。