0

Before creating this post I really did some thorough research, made few progress but now got stuck.

  1. LAMP wordpress setup in a Ubuntu box
  2. Local network behind a Humax firewall, which contains WAN with public IP address provided by ISP
  3. Managed to enable port forwarding pretty well for many ports including SSH and others for gaming, just that port 80 was absolutely not possible for some reason due to router or ISP protection.
  4. SO I had to adopt port 81 for Apache2, following the known procedures updating the conf files for Apache2.
  5. All working fine when accessing mysite.com:81 from internal 192.168.0.X....but when trying to reach from any public desktop or mobile hooked on public network, it keeps trying until a non response error comes out.

this is what I have in /var/www/html/wp-config.php:

efine('WP_HOME','http://192.168.0.19:81'); define('WP_SITEURL','http://192.168.0.19:81');

I switch UFW on/off and that doesnt change, even though I get UFW pretty open for now ( allowing almost everything).

My DNS settings are native as form LInux installation; I dont have a domain for time being; I am targeting all via IP address.

LAst and relevant: when trying 189.X.Y.Z:81/index.html from my mobile in a public network, I get the Apache2 HTML page perfectly.

thank you!

gustavo

0

I would imagine port 80 is being blocked by your ISP for your protection. ISPs often don't give you a fixed IP address so even if you get this working it might suddenly break one day if your public IP address changes so it would be worth checking this in advance and considering hosting online if you haven't already.

If you want to test if WordPress is the cause of the problem simply point apache at a different folder containing a basic index.html with some plain text in it, does that work? or same result?

If you want to test that port 81 is open use nmap to hit your IP (from a computer that is external to your network) nmap ip-address-here

I'm presuming you know this but I'm going to say it anyway, make sure your domain is pointed to your external IP not your internal IP (i.e. the IP that you get if you google "what's my IP", so nothing starting 192.168.0.X)

Basically narrow down the problem and check that it's actually a WordPress configuration issue because otherwise it could be any number of things. If it's not a WordPress issue you'll probably have better luck posting on another part of StackExchange like Server Fault

But in principle no you're not missing anything, point domain to your IP, allow exceptions in any firewalls and setup port forwarding, tell apache what port to listen on, tell WordPress what domain/port it's on.

2
  • Hi Bob ! I tried loading apache2 using a dummy page by editing index.html in /var/adm/html , but apache2 would ignore it and simply loaded my mysite.com homepage under wordpress management...as for DNS, I am not using it so far in my private network; My linux box isdriving all requests to default gateway 192.168.X.X which is the router interface from ISP( I am mixing network with DNS talks here as this is not my area) ; to access my site from outside, i simply target ISP WAN address 189.XXX.YYY.ZZZ:81 which forwarding is enabled and working as I tested via yougetsignal.com.
    – Gustavo RM
    May 17 '20 at 18:06
  • You would edit your site config in Apache so that it points as index.html instead of your Wordpress install, you could even have this in the same folder and just tell it to use index.html instead of index.php. Can you update your question to include the relevant snippets from your WordPress and Apache configs? in wp-config.php you should have 2 lines define('WP_HOME','http://example.com:81'); and define('WP_SITEURL','http://example.com:81'); as long as you have those any issue is most likely with your apache / DNS config, like I said might be more of a Server Fault question.
    – Bob
    May 18 '20 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.