我在OSX 10.9.2上运行。 我只是在VirtualBox的Lubuntu上设置LAMP,以便我可以通过VirtualBox运行一个开发服务器。 我改变了我的/etc/apache2/ports.conf
在8080上而不是80上进行监听,并且使用下面的configuration来设置我的VirtualBox端口转发和NAT:
+ -------- + ---------- + --------- + ----------- + ------- --- + ------------ + | 名称| 协议| 主机IP | 主机端口| 来宾IP | 访客端口| + -------- + ---------- + --------- + ----------- + ------- --- + ------------ + | Apache | TCP | | 8080 | | 8080 | + -------- + ---------- + --------- + ----------- + ------- --- + ------------ +
我可以通过在主机(Mac)上访问localhost:8080/testwebsite
来访问我在/var/www/
/var/www/testwebsite/
创build的网站。 我正在试图在我的访客机器上安装一个WordPress网站。 我已经遵循数字海洋的如何在Ubuntu 12.04安装WordPress,到目前为止,当我访问来宾机器(Lubuntu)内的http://localhost:8080/wordpresssite
,但是当我尝试访问http://localhost:8080/wordpresssite
在我的主机,它redirect到http://localhost/wordpresssite
,然后无法find。 我该如何解决这个问题? 提前致谢!
我结束了以下指南: http : //codex.wordpress.org/Changing_The_Site_URL
在我的wp-config.php
,我添加了以下两行
define('WP_HOME', '<host ip address here>:8080/wordpresssite'); define('WP_SITEURL','<host ip address here>:8080/wordpresssite');
这是一个小黑客,但它为我自己的测试目的。 另外,显然我已经遇到了一个问题, localhost:8080/wordpresssite
localhost/wordpresssite
在Chrome上重定向到localhost/wordpresssite
。 我认为这可能是一个缓存问题,因为当我在隐身时不会重定向。