Page 1 of 1

Error connection refused.

PostPosted: 09. October 2018 13:36
by thorv
Hi,

I installed XAMPP on an windows 7 machine (ip address 10.0.0.120, name WZ107), running wordpress on it. On this machine itself everything works smoothly.
However, when I start up another PC within the same network, and browse to http://wz107/wordpress/ or http:10.0.0.120/wordpress/ I get a white screen with a broken image logo on it.
Running diagnostics resulted in loads of these errors:
GET http://localhost/wordpress/wp-content/plugins/foyer/public/css/foyer-public.css?ver=1.6.0 net::ERR_CONNECTION_REFUSED


I have tried to set the folder xampp\htdocs\wordpress\wp-content to grant access to everyone (Rightclicked the folder, properties, security, added 'Everyone', and granted them full control.
After restarting the lot, I still get refused connections.

What I found online as possible solutions, but didn't work thus far:
In the httpd.conf file, I set Listen from 80 to 8080 (I know, windows 7, not needed) and changed the ServerName from localhost:80 to 10.0.0.120:8080

In httpd.xampp.conf I changed (In script Alias phpMyAdmin) Require local to Require All Granted.

After these settings everything just stopped functioning, these settings weren't the correct ones I think.

Any thoughts on how to get another computer to get access to the wordpress server?
Thanks,

Re: Error connection refused.

PostPosted: 09. October 2018 14:54
by Altrea
There are plenty of reports on the internet.
It is a WordPress configuration issue.

Re: Error connection refused.

PostPosted: 09. October 2018 16:37
by Nobbie
thorv wrote:Any thoughts on how to get another computer to get access to the wordpress server?


Of course, when you installed wordpress, you have been asked for the servername and you entered "localhost". This only works for a local client, but if you intend to access wordpress from another computer as shown (either via "wz107" or "10.0.0.120"), you definatley should have applied that servername instead of "localhost". Because now your wordpress generates all internal links (especially for images and CSS sheets) with "http://localhost/...", what of course fails, as localhost is the remotes client PC when you access remotely. That leads to the broken appearance.

Either re-install wordpress and apply the correct servername, or ask in a wordpress forum how to change an existing installation to run from another servername than the one applied at installation time. I remember that you at least have to adapt wp-config.php somehow, but do not remember which setting (it shouldnt be to difficult to find out) and if this already fixes it.

P.S.: A quick and dirty solution might be to edit the windows hosts file of your remote PC and apply the following setting:

Code: Select all
10.0.0.120    localhost


I am not sure if this works (it should), because Microsoft did also a dirty solution about "localhost" in Windows 7 and later for implementing IPv6 for "localhost". It might be that a setting for "localhost" may be overwritten. Check it out or (better!) change the servername of your wordpress installation.

Re: Error connection refused.

PostPosted: 10. October 2018 12:02
by thorv
Nobbie,

thanks for the advice; I'll rip out the current wordpress (and xampp) and re-install it, no worries.

Re: Error connection refused.

PostPosted: 10. October 2018 12:06
by Nobbie
You dont need to delete Xampp, only wordpress is ok.