Xampp 404 Remote Connections only working fine on localhost

Problems with the Linux version of XAMPP, questions, comments, and anything related.

Xampp 404 Remote Connections only working fine on localhost

Postby Fez » 22. March 2017 14:37

Hi,

I am running into a really odd problem. I have a wordpress install running on ubuntu 16.04 set up with xampp 7. The website is working fine, I have looked over the files permissions and everything is great even the .htaccess file is working well and the wordpress pages are being loaded correctly with mod rewrite. The problem only occurs when I try to save a post from the back end. If I am connected to the website via a remote computer it just throws a 404 error (with nothing in the logs) and when I am working directly on the server that has xampp installed on it and open the site admin via firefox and save a post it works perfectly fine.

It's really odd, I've searched for hours and have not come up with any solid answer.

Thanks in advance.
Fez
 
Posts: 5
Joined: 22. March 2017 14:32
XAMPP version: 7
Operating System: Ubuntu 16.04

Re: Xampp 404 Remote Connections only working fine on localh

Postby Altrea » 22. March 2017 16:58

Hi,

Which keywords did you google? Which google hits have you tried and which results did you get?
I would google for "how to debug wordpress 404 error" and get 1.4 Million hits.

I cannot see any reason this could be an XAMPP issue.
Maybe a wordpress related soppurt channel could help too, or a support channelr elated to that wordpress module you are using.

best wishes,
Altrea
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp 404 Remote Connections only working fine on localh

Postby Fez » 22. March 2017 18:04

Hi,

I understand what you are saying and that's exactly what I thought. I tried to troubleshoot all wordpress related problems. I deactivated my theme and deleted all plugins went back to defaults but the problem persisted. Still I was sure it was a wordpress issue. Untill I saw that I was able to do everything just fine when I was accessing the website on the machine xampp is installed on. Only when I try to access it externally it throws me a 404 message. I think it could be related to saving / publishing posts only as it throws that error in that scenario and works fine with all other mod rewrite urls.

Edit:

To clarify,

When I use my pc to access the website admin panel and try to save or publish a post or save or publish anything else it gives me a 404 error. I can still access the website just fine.

On the machine xampp is running on when I try to do the same things in the admin panel it works just fine.

This is why I am thinking it's a xampp issue.
Fez
 
Posts: 5
Joined: 22. March 2017 14:32
XAMPP version: 7
Operating System: Ubuntu 16.04

Re: Xampp 404 Remote Connections only working fine on localh

Postby Altrea » 22. March 2017 19:24

I am still thinking that this is a wordpress issue.

Which URL do you use locally?
Which URL do you use externally?
Which URL is defined in Wordpress as base url?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp 404 Remote Connections only working fine on localh

Postby Nobbie » 22. March 2017 19:55

Fez wrote:When I use my pc to access the website admin panel and try to save or publish a post or save or publish anything else it gives me a 404 error.


You probably installed WordPress to "localhost". Think about, what "localhost" means and what it means on a remote PC. Do not answer until you got what i mean! Think!
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Xampp 404 Remote Connections only working fine on localh

Postby Fez » 23. March 2017 08:34

Hey,

The local pc is configured for the url example.com and the entry is made to hosts 127.0.0.1 for example.com

The same url is being used when accessing it remotely. I've defined the same url inside WordPress too.
Fez
 
Posts: 5
Joined: 22. March 2017 14:32
XAMPP version: 7
Operating System: Ubuntu 16.04

Re: Xampp 404 Remote Connections only working fine on localh

Postby Altrea » 23. March 2017 09:30

This can be a problem if you defined namebased virtual hosts in Apache and used the domain as part of the leading <virtualhost> line
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 11926
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: Xampp 404 Remote Connections only working fine on localh

Postby Fez » 23. March 2017 10:13

Figured out the problem. The networking guys had set up an external firewall which was blocking the requests from remote connections. It's really odd that it was throwing a 404 error though. Really appreciate your help on the matter.
Fez
 
Posts: 5
Joined: 22. March 2017 14:32
XAMPP version: 7
Operating System: Ubuntu 16.04

Re: Xampp 404 Remote Connections only working fine on localh

Postby Nobbie » 23. March 2017 13:58

Fez wrote:It's really odd that it was throwing a 404 error though.


Indeed, thats not only odd, that MUST NOT happen. A 404 error means, that the request did pass the firewall (because this response is coming from the remote PC, which should be blocked by the firewall). There is something wrong, a firewall cannot cause a 404 error.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Xampp 404 Remote Connections only working fine on localh

Postby Fez » 23. March 2017 16:09

Exactly what I thought but I disabled the firewall and everything started working normally. I noticed that its only happening when a request is being sent via ajax in wp-admin I still do not know why or how its throwing a 404 error but when I refresh the page that shows the 404 error it loads it just fine.

For example:-
The request would go to /wp-admin/post.php?id=xyz
pressing the update button will take me to 404 for the same url /wp-admin/post.php even though it exists and when i would press the refresh button it loads that page just fine.

Its so odd.
Fez
 
Posts: 5
Joined: 22. March 2017 14:32
XAMPP version: 7
Operating System: Ubuntu 16.04


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 40 guests