Title: web server WAN/LAN connection problem
Last modified: May 5, 2018

---

# web server WAN/LAN connection problem

 *  Resolved [ismailfatih](https://wordpress.org/support/users/ismailfatih/)
 * (@ismailfatih)
 * [8 years ago](https://wordpress.org/support/topic/web-server-wan-lan-connection-problem/)
 * Hi, i made web server for WordPress on raspberry pi (single board computer linux).
   In local network everything is ok. i bought static ip from my ISP and i forwarded
   80 port of raspberry to global network. while trying to connect WordPress by 
   global ip from external network (e.g. smartphone with 4G) pages are too slow(
   images not shown and theme is basic).
 * [screenshot](https://image.ibb.co/mFX4r7/wordpress_raspberry_wan.png)
 * To solve that i change wordpress site url&wordpress url from local ip to global
   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. How can i solve this ?
    -  This topic was modified 8 years ago by [ismailfatih](https://wordpress.org/support/users/ismailfatih/).
    -  This topic was modified 8 years ago by [ismailfatih](https://wordpress.org/support/users/ismailfatih/).
    -  This topic was modified 8 years ago by [ismailfatih](https://wordpress.org/support/users/ismailfatih/).
    -  This topic was modified 8 years ago by [ismailfatih](https://wordpress.org/support/users/ismailfatih/).

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [8 years ago](https://wordpress.org/support/topic/web-server-wan-lan-connection-problem/#post-10247221)
 * You might be able to get a piece of your LAN software to map/forward the global
   IP to the RaPi’s LAN server. Can the router/modem be configured to forward the
   global IP when it is use on the LAN side ?
 * Now for a solution that will work:
    – Configure the DHCP server in your router/
   modem to permanently assign a local IP to the RaPi, say “192.168.1.31” – buy 
   a domain name, say “myuniquename.com” – set the domain name to resolve to your
   global IP – configure the RaPi to use VirtualHost technique, details here: `http://
   httpd.apache.org/docs/current/vhosts/name-based.html` This will entail add VirtualHost
   directives in /etc/apache2/sites-enabled/001-local Something like:
 *     ```
       <VirtualHost *:80>
       DocumentRoot /var/www
       ServerName myuniquename.com
       ServerAlias www.myuniquename.com
       </VirtualHost>
       ```
   
 * – do the “Moving WordPress” procedure and reconfigure the RaPi to use the domain
   name in site address and WordPress address.
    The website is now accessible from
   the world using the domain name, now for all the PCs on the LAN. – on each PC
   on the LAN that will access the RaPi site, add these line to the “hosts” file:
 *     ```
       192.168.1.31	myuniquename.com
       192.168.1.31	www.myuniquename.com
       ```
   
 * On the RaPi this would be:
 *     ```
       127.0.0.1	myuniquename.com
       127.0.0.1	www.myuniquename.com
       ```
   
 * Details on the hosts file for various flavors of Windows/Linux/Mac at:
    [https://en.wikipedia.org/wiki/Hosts_(file)](https://en.wikipedia.org/wiki/Hosts_(file))
 *  Thread Starter [ismailfatih](https://wordpress.org/support/users/ismailfatih/)
 * (@ismailfatih)
 * [8 years ago](https://wordpress.org/support/topic/web-server-wan-lan-connection-problem/#post-10248611)
 * it works perfect thank you so much
 *  [RossMitchell](https://wordpress.org/support/users/rossmitchell/)
 * (@rossmitchell)
 * [8 years ago](https://wordpress.org/support/topic/web-server-wan-lan-connection-problem/#post-10248828)
 * Would you please describe what you did ? This way this support thread becomes
   more useful to the wider community.
    Also if you think it is appropriate would
   you mark this thread as closed.
 *  Thread Starter [ismailfatih](https://wordpress.org/support/users/ismailfatih/)
 * (@ismailfatih)
 * [8 years ago](https://wordpress.org/support/topic/web-server-wan-lan-connection-problem/#post-10251490)
 * i bought domain. i forwarded it to my static ip. than i added below settings 
   in rpi
 *     ```
       <VirtualHost *:80>
       DocumentRoot /var/www
       ServerName myuniquename.com
       ServerAlias www.myuniquename.com
       </VirtualHost>
       ```
   
 * i changed wordpress site&wordpress adress url to my domain. than i configured
   hosts file on my desktop.
 *     ```
       192.168.1.31	myuniquename.com
       192.168.1.31	www.myuniquename.com
       ```
   
    -  This reply was modified 8 years ago by [ismailfatih](https://wordpress.org/support/users/ismailfatih/).

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘web server WAN/LAN connection problem’ is closed to new replies.

## Tags

 * [connection](https://wordpress.org/support/topic-tag/connection/)
 * [LAN](https://wordpress.org/support/topic-tag/lan/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 2 participants
 * Last reply from: [ismailfatih](https://wordpress.org/support/users/ismailfatih/)
 * Last activity: [8 years ago](https://wordpress.org/support/topic/web-server-wan-lan-connection-problem/#post-10251490)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
