Accessing webmin through browser port :10000 - terminal

Recently set up a Debian 9.1 x64 server with SSH and LAMP stack (PHP ver7.0). PHP and Apache are both installed correctly since I get their landing pages. UFW is also active.
I have now installed webmin(using apt-get) and also tried following the instructions from http://www.webmin.com/deb.html on a different occasion. I "sucessfully" completed the installation(s) via terminal and it directed me to goto https://MY_Domain:10000 and to log in with root.
After multiple attempts, even tried using https://MY_IP_ADDRESS:10000 I am greeted with "Safari cannot open MY_IPADDRESS because it cant connect to the server".
I have tried the following to solve my problem:
-Reinstalling webmin,
-Restarting webmin,
-Stopping my UFW firewall,
-Allowing ports 10000 ,HTTPS port (443 I think), port 22, port22 v6
-Opening webmin config and changing the port/listen line to listen to another port such as 44321,
-Opening error logs. The only "error" that appeared was something about not being able to do something with IPv6,
-Using different browsers,
I have read many forum posts of users having similar problems but none of the solutions have been effective. I have heard of IPtables but for some reason I cannot implement that solution. Im very new to server configuration therefore I'd appreciate the help.
Similar post: Unable to access Webmin through browser

Ok so I finally fixed it. To fix this, log in as root then nano to
sudo nano /etc/webmin/miniserv.conf
Turn off SSL by setting it to 0.
The restart webmin and try to connect.
Im about to research into whether this is a safe practice.

I get the same problem only after system restart. All works fine, firewall configured for webmin port and all, also tried with fireall disabled, after system restart all goes down the drain, webmin service is ufo and after uninstall and reinstall webmin the story replays. I am at my wits end. Good bye opensuse!

Related

Localhost refused to connect on WSL2 when accessed via https://localhost:8000/ but works when using internal WSL IP adress

What I'm Trying to Achieve
To access localhost from my local machine during the development of a Symfony web app.
My Environment
WSL2 running on Windows 10
Linux, Apache2, MySQL, PHP-7.4 stack (with Xdebug3 intalled)
Debian 10
Symfony 5.4 (although not sure on if relevant to this problem)
Steps I've Taken
Set up WSL2 according to this Microsoft WSL2 tutorial
Set up LAMP stack according to this Digital Ocean tutorial
Set up Symfony according to this Symfony tutorial
Run the following bash script on startup to start my services and set the host to the virtual WSL IP in my xdebug.ini file
#!/bin/sh
REMOTEIP=`cat /etc/resolv.conf | grep nameserver | sed 's/nameserver\s//'`
sed -i -E "s/client_host=[0-9\.]+/client_host=$REMOTEIP/g" /etc/php/7.4/mods-available/xdebug.ini
service php7.4-fpm start
service apache2 start
service mysql start
Run my Symfony project on the development server using symfony serve -d (Symfony then tells me "The Web server is using PHP FPM 7.4.23 https://127.0.0.1:8000")
Go to https://localhost:8000/ in Chrome where the app is running
What I Expect to Happen
My Symfony web app to be running on https://localhost:8000/ when I visit the URL in my Chrome browser
What Actually Happens
I get "This site can't be reached localhost refused to connect." in the Chrome browser
What I've Tried
This used to happen less frequently and I would give my laptop a restart, repeat the process above, and I could connect via https://localhost:8000/. However, it refuses to connect more regularly now (like 8/10 times I start up for the day)
Connecting to https://127.0.0.1:8000 yields the same result.
Connecting to the site using the internal WSL IP address, found using hostname -I and replacing localhost with this IP (still on port 8000). This is an adequate workaround to use my app, however I am unable to interact with my database via MySQL Workbench without having to set up a new connection, therefore a fix where I can use localhost would be very helpful!
(Based off comments) Only ran symfony serve -d without starting apache and PHP services separately - still sometimes allows connections to localhost but sometimes doesn't work.
Conclusion
The behaviour is odd as it works sometimes but other times it doesn't when the exact same steps are carried out. I am unsure where else to look for answers and I can't seem to find anything online with this same problem. Please let me know if any config files, etc would be helpful. Thank you so much for your help! :)
When it's working normally, as you are clearly aware, the "localhost forwarding" feature of WSL2 means that you can access services running inside WSL2 using the "localhost" address of the Windows host.
Sometimes, however, that feature breaks down. This is known to happen when you either:
Hibernate
Have the Windows "Fast Startup" feature enabled (and it is the default). Fast Startup is a pseudo-hibernation which triggers the same problem.
Typically the best solution is to disable Hibernation and Fast Startup. However, if you do need these features, you can reset the WSL localhost feature by:
Exiting any WSL instances
Issuing wsl --shutdown
Restarting your instance
It's my experience that localhost forwarding will work after that. However, if it doesn't, thanks to #lwohlhart in the comments for mentioning that another thing to try is disabling IPv6 on WSL2, since (I believe) there's a possibility that the application is listening on IPv6 while the Windows->WSL2 connection localhost connection is being attempted on IPv6.
You can disable IPv6 on WSL2 per this Github comment by creating or editing .wslconfig in your Windows user profile directory with the following:
[wsl2]
kernelCommandLine=ipv6.disable=1
A wsl --shutdown and restart will be necessary to complete the changes.
If you find that this works, it may be possible to solve the issue by making sure to either use the IPv4 (127.0.0.1) or IPv6 (::1) address specifically in place of localhost on the Windows side, or by configuring the service to listen on both addresses.
Try to run command netstat -nltp. It shows active addresses and ports. Your nginx process should be run at 0.0.0.0:8000. 0.0.0.0 means the nginx process is available from anywhere.
If your nginx process is ran by any specific ip address, you should access it by that ip address, e.g http://192.168.4.2:8000.

Unable to open Ambari login page with Hadoop (http://127.0.0.1:8080/)

I have opened the virtual box, put in the password, and typed in ifconfig to find out the host address, which is http://127.0.0.1:8080/. However, I still cannot open the Ambari login page. I have tried multiple browsers, including IE, Chrome and firefox. None of them worked.
Basically the browser gives me the following message:
This page can’t be displayed
•Make sure the web address http://127.0.0.1:8080 is correct.
•Look for the page with your search engine.
•Refresh the page in a few minutes.
I don't know what's wrong with it. Can someone help me with that?
I found that I had a conflict with my local IIS that was hosting a local website on port 8080.
I solved the problem by changing the ambari port to 8082.
This is how I did it.
1) I first checked to see if port 8082 was in use using netstat, you could also check if 8080 is in use to confirm you have the same problem.
2) Fireup the hadoop VM and login.
3) Follow the link below, this will show you how to change the ambari port
https://docs.hortonworks.com/HDPDocuments/Ambari-2.1.1.0/bk_ambari_reference_guide/content/_optional_changing_the_default_ambari_server_port.html
4) Restart ambari
https://ambari.apache.org/1.2.0/installing-hadoop-using-ambari/content/ambari-chap2-3.html
5) Re-configure port forwarding on your VirtualBox. There is a section in the following blog.
http://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
I hope this helps
I had the same issue and I am using virtual box, i just started the "Hortonworks Sandbox" from Virtualbox and my ambari worked.
http://127.0.0.1:8080

apache in xampp won't turn on - after it worked before

I recently installed Xampp on my windows machine. It worked when I just did it, see here. However, now the apache won't turn on. I realize that I did not close it correctly (did not use xampp_stop), so maybe that could be the cause.
The error I am getting is:
make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
unable to open logs
How can I get it to work?
Just ran into this very well do documented blog with respect to Apache not working.. I think its really good to reference if you have apache startup issues.
apache friends
here are the steps that i note from the link:
Check that xampp folder is not in a folder containing spaces or brackets ie (Program Files (x86)
Make sure that you have run \xampp\setup_xampp.bat (probably as administrator)
in CMD run -netstat -a (or look in Xampp control beta 3 - and press the netstat button... ) , make sure that nothing is running on port 80 ( on win 7 a lot of the time its actually skype that uses port 80) ( quit skype and try again, if so, in skype --> options ->> advanced --> make sure the "use port 80 as alternative checkbox is unchecked"
If "system" is using port 80, then its windows that is using it ( i have read that that is some IIS service) - if you enable xampp as a service and re-boot then xampp grabs port 80 before system...
If you dont want to run as a service then open xampp\apache\conf\http.conf and change the port that apache will run on (search for string "Listen 80" and "ServerName localhost:80" and change 80 to something else eg: "180")
Make sure you are running Xampp control.exe as administrator
Stop your firewall temporarily to see if its being stopped (then try startup apache again) if so, create an exception in windows firewall
Check that your anti-virus is not stopping it.
If you are running windows 7 64 bit ultimate (sp1) (like i am) - then you may still have a problem (like i am)
last try is to delete xampp folder, and download a previous version of xampp, then try again.
If you have any other steps that you think may also cause a problem, please comment.
I ended up solving it.
Go to the Xampp control panel. Check the "Service" check box.
Clicked on "SCM" button. (Or "Service" button, there on the "SCM" button).
Then I clicked on the "Apache" in the list of services. Turned it on.
Now it is labelled as "Running" in the control panel, and "localhost" works.
I ran into this issue a couple months ago. You have to set Apache as an automatic windows service by checking the Svc checkbox in the XAMPP Control Panel. Once you have set it as a service, you will need to restart windows before you can start apache. Once you have restarted windows, you should be able to stop and start Apache through the XAMPP Control Panel.
From a blog post about it:
The reason you have to do this is because Windows 7 has a service called http.sys which starts automatically and uses port 80. Running Apache as an automatic service causes apache to start before the http.sys service. This allows apache to get port 80 before http.sys starts.
One: If it is running as a service, check your services in windows and make sure it is stopped.
Two: If it is not a service, it will just be a process; go into the task manager and find httpd / apache and terminate the process.
Three: Make sure you are running xampp_start / xampp_control as administrator, on some systems this is important.
I would recommend always using xampp_control as it gives a quick window into whether Apache is supposedly running or not even if some unusual events recently occurred.
Try
netstat -aon | more
If this doesn't work, to see if anything else is listening on that port, and terminate that process.
You may also wish to edit Apache's httpd.conf (probably in xamppdir/apache/conf) to listen to another port and see if it will launch.
Steps:
change the httpd.cong file in those lines:
Listen 8080
ServerName localhost:8080 ( port as example, 8080)
Now, create a xampp.ini file where the xampp-control.exe located and put the code into it:
[PORTS]
apache = 8080
Now restart the xampp.
Hope, it will work to change the apache port. But if you have installed oracle 10g client or any software in which perl is installed then do some more steps like bellow:
4.change the lines from:
`# Perl settings`
`Include "conf/extra/httpd-perl.conf"`
to
`# Perl settings`
`#Include "conf/extra/httpd-perl.conf"`
Now restart the xampp and it works properly in 8080 port.
I found the problem in TeamViewer application - it uses port 80 by default. Under advanced setting I made changes so the application will not use port 80 or 443 for incoming connections. Then switched of xammp and ran again. It works!
I had a similar problem, and after a bit of research, found out that the culprit in my case was the "World Wide Web Publishing Service" (W3SVC in the iissvcs Group).
Apache in XAMPP ran without a problem after stopping this service in my case.
My XAMPP Apache all of the sudden wouldn't start, and, while I wasn't getting that error message specifically, it was because I installed a Skype upgrade, and Skype took over port 80 when my PC started which blocked Apache. I tweaked a Skype advanced setting to fix this.
If your issue hasnt been solved, scan this page for the "windows auto fix" link. It worked for me: Ran the tool, restarted PC, all ports open, instantly on.
http://support.microsoft.com/kb/811259/en
GL
This might help others that's why I am posting my particular solution. I recently swapped Zend Server CE for XAMPP (2.5). The VHOSTS file had to be set-up with an Include directive to an error_log. I was having issues with SVN so I wiped the project I am working on to get a fresh install. However, I happened to start XAMPP prior to doing an svn checkout. That's when I noticed apache doing the Busy...Apache started [Port 80] business. Someone's comment on this thread reminded me of the Include directive. I climbed through the directories and added a blank error_log and blammo! Apache started up nicely.
This might help someone else too :)
In my case I solved it by opening xampp\apache\conf\http.conf.
I changed Listen 80 to Listen 2337
Above that line I had to add Listen 127.0.0.1:80
Then I opened xampp\apache\conf\httpd-ssl.conf
I changed Listen 80 to Listen 7332
Then I could connect to localhost again.

Apache can't connect to http://localhost/. Port is changed to 81

I've just installed apache2.2 and installed it, but to get it running I had to change it listening port to 81. But the thing is now that I cant connect to it through localhost. The only thing I get is a login window and when I type in the authentication information that I think is my windows login. I get:
error '8002801c'
Error accessing the OLE registry.
/iisHelp/common/500-100.asp, line 17
The computer is a winxp and I've opened the ports out and no firewall is blocking apache.
Seems like the machine has another webserver running, probably IIS.
You can uninstall that through the configuration screen.
Try http://localhost:81/ to get the apache install.

localhost host not working on XAMPP

I am facing same problem to the thread. I've gone through all the suggestions provided in the solution. I've searched all possible solution but nothing gonna workout.
"http://stackoverflow.com/questions/817745/localhost-not-working-on-xampp-both-service-apache-mysql-are-fine"
I've ensured :
1. Xampp is successfully started (in log) but it is not receiving any request(checked access.log).
also ensured that it is running on port 80 in config file.
confirmed status of application using netstat
C:\Documents and Settings\user>netstat -aon | grep 80
TCP 0.0.0.0:80 0.0.0.0:0 LISTENING 3524
Checked host file in /windows/system32/drivers/etc/hosts and has only one entry
127.0.0.1 localhost
skype teamviewer or other application are closed and configured not to use port 80.
ensured that windows firewall allows http process to use port 80.
pinged localhost, 127.0.0.1 and my ip (192.168.1.2). localhost resolves to 127.0.0.1
tried different urls http:// localhost http:// localhost:80 http:// 127.0.0.1 http:// laptop-name but nothing works. browser just waits for response (spaces after http to allow links in this post)
ensured that there is no loop in index.php(it is untouched) and also has index.html. also tried diffent paths
nothing gonnna work out. I am irritated and I dont want to format my machine. please help....
when this happens to me it is usually Skype taking over the default localhost address
Check on command prompt
netstat -a -b
And close any other application like skype etc using 80 port.
Try stopping IIS. It worked for me.
Select Start, then type IIS in the search box
select Internet Information Services Manager
In the manager on the right under "Manage server"select "stop"
I was having an issue with Last.fm that is very similar to yours, and I found that it was a software conflict.
The Last FM scrobbler application would not finish installing on my new build because it couldn't login or authenticate my username. I tried the regular scrobbler application and then tried the beta desktop program on Windows 7 64 bit. I suspected Skype or TeamViewer, but even after stopping or exiting those programs, neither versions of the installation would log in to the services.
The beta desktop application actually authenticated on 127.0.0.1 (random port) through my internet browser, but my browser would time out trying to send data over the port.
I checked and edited my HOSTS file in Windows, but that didn't fix the issue either.
Pinging 127.0.0.1 worked, but pinging any variation of the port would time out.
Finally, I decided to uninstall the Windows 7 Firewall Control program made by Sphinx Software. Mind you, I had set the firewall to be disabled at start up (clean start-up - all startup programs disabled through MSConfig).
I made sure that the firewall program was not running at all in my services. However, after uninstalling the software, even without restarting my computer, 127.0.0.1 opened up on all ports and my Last.fm scrobbler finally connected and finished installation.
So, it may be a hidden setting that can only be undone by uninstalling programs (even programs that aren't running).
For me localhost was not the correct address.
Type into cmd "hostname" and use that as the url.
CMD -> hostname
If that doesn't work try just the ip address of the server (or computer)
I stored my website folder in xamp/htdocs (windows machine). Then I started apache on the XAMP control panel. My pages rendered successfully when I called http://localhost/mysite/index.html.
I hope this is helpful.

Resources