problems with port other than 80

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

problems with port other than 80

Postby dotline » 12. October 2022 07:41

Hi

Installed xampp on Windows 10 64bit. Local development working fine on port 80. If I change it to anything like 8080 for remote access, the local website cannot be accessed. Only apachefriends and phpmyadmin pages are visible.

Let me know please what information do I need to share.
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Re: problems with port other than 80

Postby Altrea » 12. October 2022 16:26

All information is missing.

Are the components successfully restarted?
How do you try to access the website? What do you type in your browsers address bar?
What response do you get? blank page? error messages?
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: 11952
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: problems with port other than 80

Postby dotline » 12. October 2022 18:26

Thanks for asking.

Changed httpd.conf: Listen 80 to "Listen 192.168.10.169:8080", and Servername to "Servername 192.168.10.169:8080"
All components restarted successflly.

On the server machine, (the PC where I installed xampp), if I type localhost:8080 the apachefriends page is displayed. I can access phpmyadmin from that page. But when I try to access my website, it gives me error," localhost refused to connect". I have tried localhost:8080/mywebsite but with the same result.

192.168.10.169:8080 opens the apachefriends page. The address looks like 192.168.10.169:8080/dashboard/. If I reuse the address as 192.168.10.169:8080/mywebsite/ it goes in to loading mode. The spinner spins but nothing happens.
(Not sure if worth mentioning, while the spinner is spinning, the status message at the bottom says "waiting for www.facebook.com". It has happened before and after reinstalling xampp.)
Following is the entry from access.log:
192.168.10.169 - - [12/Oct/2022:22:17:42 +0500] "GET /mywebsite/ HTTP/1.1" 200 119545 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/105.0.0.0 Safari/537.36"

Since I started typing this message, the spinner is still in action. About 10 minutes now.

Please let me know if I need to send more info.
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Re: problems with port other than 80

Postby Nobbie » 12. October 2022 19:41

dotline wrote:But when I try to access my website, it gives me error," localhost refused to connect". I have tried localhost:8080/mywebsite but with the same result.


You probably installed a software like WordPress, Joomla or whatever. And when you installed it, you installed it to Port 80. The installation procedure of these tools create configuration files and/or configuration entries in databases, where the URL of the installation is stored. And MOSTLY, all of these tools do a redirect to index.php or similar everytime you call it. And this redirect now fails. Because there is no more server at Port 80.

You have to find out the configuration and to change. Or, if you dont find it, reinstall your software again with Port 8080.

dotline wrote:"waiting for http://www.facebook.com".


Thats another hint, maybe you have blocked all outgoing request on Port 80 in your firewall or similar?

Why did you change Port 80 to 8080?
Nobbie
 
Posts: 13219
Joined: 09. March 2008 13:04

Re: problems with port other than 80

Postby dotline » 13. October 2022 06:32

"You have to find out the configuration and to change. Or, if you dont find it, reinstall your software again with Port 8080."
Sure. I will look into it.

"Why did you change Port 80 to 8080?"
I want to access my website from other machine on LAN. And also from outside (internet).
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Re: problems with port other than 80

Postby Altrea » 13. October 2022 06:39

What makes you think port 8080 is better for this than port 80?
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: 11952
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: problems with port other than 80

Postby dotline » 13. October 2022 14:31

Internet!
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Re: problems with port other than 80

Postby Altrea » 13. October 2022 14:57

That's totally wrong.
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: 11952
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: problems with port other than 80

Postby Froosh » 13. October 2022 15:50

I totally agree with Altrea. There is a lot of information on the internet, and an awful lot of that information is either incorrect, or simply some person's opinion. Nothing you take from the internet should be naively believed or anything else without you having done some research. Anyone can, and a lot do, post complete non-sense. The only advantage I can think of for using an alternate port would be if you already had a web server, say IIS, or application that uses port 80.
User avatar
Froosh
 
Posts: 138
Joined: 27. March 2022 17:56
XAMPP version: 8.2.0
Operating System: Windows 11 Pro

Re: problems with port other than 80

Postby dotline » 14. October 2022 18:58

Many thanks Altrea and Froosh.

Now I need real guidance. I did a clean install of WP. Still cannot access it from LAN. Ultimately I would like to access from internet.

Thanks for your help.
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Re: problems with port other than 80

Postby Nobbie » 14. October 2022 19:08

1) Where did you install WordPress? (Folder?)
2) What do you enter in LAN client PCs in order to reach WordPress?
3) What happens, which messages do you get?
4) What did you do in order to reach WordPress from internet?
Nobbie
 
Posts: 13219
Joined: 09. March 2008 13:04

Re: problems with port other than 80

Postby dotline » 15. October 2022 07:42

Hello Nobbie,

Thanks for helping me:
1) Where did you install WordPress? (Folder?)
D:\xampp\htdocs\mywebsite

2) What do you enter in LAN client PCs in order to reach WordPress?
192.168.10.169 - This takes me to Apache Friends page and url shows as: http://192.168.10.169/dashboard/

3) What happens, which messages do you get?
When I edit the url and change it as: http://192.168.10.169/mywebsite/, I get:
i) localhost refused to connect ERR_CONNECTION_REFUSED
ii) The url changes to localhost/mywebsite/

4) What did you do in order to reach WordPress from internet?
enabled live IP
When I type just the IP address, I get Apache Friends page from my system. I can click on all menu items and get response, except phpmyadmin. Which gives me 403.
If I type live IP/mywebsite/, I get the same error: localhost refused to connect ERR_CONNECTION_REFUSED and the url changes to: localhost/mywebsite/

Regards
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Re: problems with port other than 80

Postby Altrea » 15. October 2022 07:47

You need to configure Wordpress properly. Wordpress does have settings for site url for example. If the site url is set to localhost because you installed wordpress from localhost, all urls are getting generated wrong and lead to an dead end.

=> https://wordpress.org/support/article/changing-the-site-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: 11952
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 11 Pro x64

Re: problems with port other than 80

Postby Nobbie » 15. October 2022 10:58

As it is a new WordPress Installation anyway, i think its easier to install it again once more, instead of modifying the configuration settings. When installing WordPress and you are asked for the ServerName or HostName, dont overtake "localhost", instead enter the LAN IP 192.168.10.169. Or, as you want to run via live IP, enter this IP instead of localhost or the LAN IP. This should work even if you are working at the Xampp PC.

Finally start your WordPress via Live-IP/mywebsite (on all clients, even if you are on the Xampp PC). Last not least, if you have live IP enabled, you already can start the WordPress installation from Live-IP/mywebsite instead from localhost. You wont need to override any "localhost" ServerName, as then the Live-IP will be the Default Value, exactly what you need. Thats the easiest and best way to install WordPress for live IP access.

Xampps Phpmyadmin runs only on localhost, that is wanted for your safety. If it would run from live IP, the whole world could modify your data, definately not something you will like.
Nobbie
 
Posts: 13219
Joined: 09. March 2008 13:04

Re: problems with port other than 80

Postby dotline » 20. October 2022 09:26

Hi,

Done all of above. Still getting ERR_CONNECTION_REFUSED
dotline
 
Posts: 7
Joined: 12. October 2022 07:19
XAMPP version: 8.1.6
Operating System: Windows 10 64bit

Next

Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 107 guests