2

I'm trying to set up wordpress on debian jessie.

I can access the site within my LAN but not from outside...

Port forwarding is set on my router from TCP 80 -> 192.168.1.150 (local ip wordpress server)

When i try to access it from outside, it's still trying to resolve my local ip (i see that on chrome which is saying "Waiting for 192.168.1.150...")

It works fine with apache2 default page. I have another web server and it works fine too.

  • Do i have to put something special in apache2 .conf file (maybe to preserve relative paths ?)

  • Do i have to change something in /etc/hosts ? I tried to add those lines

    127.0.0.1 mydomain.net 192.168.1.150 mydomain.net

But it's still the same...

Any help would be greatly appreciated !!

3
  • If an external client, is getting redirected to 192.168.1.150, then your Apache configuration isn't setup to allow external clients to connect to it.
    – Ramhound
    Commented Feb 13, 2017 at 17:11
  • Then why is it working with apache2 default page ?
    – jaydee99
    Commented Feb 13, 2017 at 17:12
  • Don't have enough information to speculate. Wordpress or Apache is not configured the correct way if it attempts to redirect your external client to an internal intranet ip address.
    – Ramhound
    Commented Feb 13, 2017 at 20:12

1 Answer 1

4

Wordpress will redirect you to the URL you have configured in:

Settings > General

My guess is you're getting to the wordpress engine, and it is redirecting you to the local IP. Just update "Wordpress Address (URL)" and "Site Address (URL)" to be your public IP address and you should be good.

2
  • Damn, you're good ! I spent 2 days trying to change /etc/hosts, trying to edit apache2 .conf files and modifying my router settings and it was as simple as that. Works perfectly, now, thanx a lot !
    – jaydee99
    Commented Feb 14, 2017 at 11:24
  • No problem. Can you please mark my response as the answer? Commented Feb 14, 2017 at 13:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .