简体   繁体   English

WordPress的Web服务器的WAN / LAN连接错误

[英]wordpress web server WAN/LAN connection error

i made web server for WordPress on raspberry pi (low cost linux single board computer). 我在树莓派(低成本linux单板计算机)上为WordPress制作了Web服务器。 In local network everything is ok. 在本地网络中一切正常。 i bought static ip from my ISP and i forwarded 80 port of raspberry to global network. 我从ISP购买了静态ip,然后将80的raspberry端口转发到了全球网络。 while trying to connect WordPress by global ip from external network (eg smartphone with 4G) pages are too slow(images not shown and theme is basic). 尝试通过外部网络(例如具有4G的智能手机)通过全局ip通过ip连接WordPress页面时,速度太慢(图像未显示,主题是基本的)。

网站的屏幕截图

To solve that i change wordpress site url&wordpress url from local ip to global ip. 为了解决这个问题,我将WordPress站点URL和WordPress的URL从本地IP更改为全局IP。 at this time i can connect from external network with global ip too fast, but i cannot connect it by desktop computer which is on local network(browser going to router(huawei HG658)main page when global ip was entered) so that i can't use dashboard, write posts anything else. 这时我可以从外部网络与全局ip连接的速度太快,但是我不能通过位于本地网络上的台式机(输入全局ip时浏览器转到路由器(huawei HG658)主页)连接它,这样我可以使用仪表板,写其他内容。 How can i solve this ? 我该如何解决?

I solved the problem. 我解决了问题。 i bought domain. 我买了域名。 i forwarded it to my static ip. 我将其转发给我的静态IP。 than i added below settings in rpi /etc/apache2/sites-enabled/001-local 比我在rpi / etc / apache2 / sites-enabled / 001-local中的设置下添加的要多

<VirtualHost *:80>
DocumentRoot /var/www
ServerName myuniquename.com
ServerAlias www.myuniquename.com
</VirtualHost>

i changed wordpress site&wordpress adress url to my domain. 我将wordpress网站和wordpress地址更改为我的域。 than i configured hosts file(c:\\Windows\\System32\\Drivers\\etc\\hosts) on my desktop. 比我在桌面上配置的主机文件(c:\\ Windows \\ System32 \\ Drivers \\ etc \\ hosts)。

192.168.1.31    myuniquename.com
192.168.1.31    www.myuniquename.com

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM