Apache - CentOS 8 - Can't view hosted webpage except from the local server - apache

The Issue: I have disabled SELinux entirely. We have Apache running on a CentOS 8 VM. We have a simple information page running on the server. It displays great when we are on that VM in Gnome using either 127.0.0.1, locahost, or it's actual IP address. However, we cannot view this page from the same subnet or any subnet. The message we get in our browsers when off that server is "server took too long to respond". I am thinking there is some small little thing we must be missing in the Apache config. We even have Webmin on there to make the administration easier. I have never had this problem with CentOS 5/6/7 previously. I know that CentOS 8 is the last release as RHEL has bought it, and they want to see CentOS killed off.
Actions Taken:
Disabled SE Linux entirely to eliminate it being a firewall issue.
Installed Webmin to have access to the Apache administration module making looking for any issue easier.
Tested from the server itself in Gnome which the page comes up.
Tested from other computers on the same subnet, off the same switch.
Tested from other subnet computers.

Related

FreeNAS VM's not starting

I am running FreeNAS 11.1-U5 at home. I have everything configured and have created VM's for Windows Server, Ubuntu, pfSense, FreePBX. I was able to install Windows and Ubuntu, but shortly after (a few hours after installing them), and after turning them off through the FreeNAS GUI, they have stopped turning on. FreeNAS reports at the top of the GUI that the start was successful, but the VM details still read "stopped".
I have run the VM's before and have the required settings in my CMOS configured for the Host (FreeNAS machine). Restarting the host will fix the problem for a while and it will let me work with the VM's, but I cannot keep restarting FreeNAS. Can anyone tell me why this happens and how to fix it please?

Why can't my friends access my website built with Apache2?

So, I have been building this website with HTML and I decided to host it with on Apache2. It runs on an Ubuntu and me already changed the VM assigned Ip, which is 10.2.0.15, into another one. I can access it on the Mac where the VM is, but I asked my friend if he can open it, and he said it was a 404 Server not found error.
Please help!
You probably need to enable port forwarding:
https://www.howtogeek.com/122641/how-to-forward-ports-to-a-virtual-machine-and-use-it-as-a-server/
You haven't indicated what VM software you are using, but the above is for VirtualBox. VMware is a bit different. Also make sure your router is not blocking any packets or any firewall.

Can't access to wamp/xampp apache localhost:80 WINDOWS 10

I recently upgrade my Windows 7 to Windows 10 (9). I need to use Apache server for web development. But for some reason I can't access it via web browser.
First I tried to look in the firewall and antivirus settings. It looks fine. I've tried reinstall xampp then I tried Wamp. Nothing working. I'tried 3 web browsers Edge, Opera, Chrome. Then I tried to find if some application is blocking port 80. So I disabled Skype, IIS. Then I tried different ports 8080,9080,123. Still can't access it via browser, but ping works.
Then I disable preference of Ipv6 and I prefer IPV4 now. I've changed HOSTS file so only 127.0.0.1 localhost is uncommented.
Only problem occurs when I try run wamp my internet access became unavailible and a have to restart computer to access internet again.
Has anyone here have same problem, because according to everything I ve done it seems apache server and network settings is correct.
Maybe problem is somewhere else?
Thank you for your help.
Solved with clean Windows 10 installation.

Ubuntu on VirtualBox and Rails server

I have Windows 7. Installed VirtualBox and Ubuntu 11.04 as guest OS.
Networking is done by NAT.
Everything is fine: I have internet on Ubuntu.
I can access Windows from Ubuntu by its ip.
But i can't access Ubuntu by it's ip which is shown by ifconfig.
I run rails on Ubuntu.
How can I solve this problem: connect to Ubuntu/Rails server on ort 3000 from my Windows?
By default, VirtualBox's NAT allows the virtual machine to access the Internet ; but doesn't allow the physical machine to access the Virtual one.
The simplest solution would be to use another networking setting than NAT, for your Virtual Machine -- for instance, bridge should work fine (your VM would be visible on your network, though).
Another solution would be to use port forwarding ; about that, this article might help : Howto Access via ssh a Virtualbox Guest machine.
I used to struggle with configuring a similar setup until I found Vagrant. Vagrant makes it very simple to setup, connect to and work with a Linux virtual machine. After Vagrant is configured you can just type vagrant ssh to enter the virtual machine and your account has automatic sudo rights and everything works as expected - you don't even have to deal with logging into the vm. The initial setup for ssh does look to be a little more work under Windows though as you need to configure Putty before you can connect.
There is a simple configuration file in Vagrant that you use to specify which ports from the VM you want forwarded to your machine using a syntax like:
config.vm.forward_port("rails", 80, 3000)
config.vm.forward_port("tomcat", 8000, 8080)
and everything is taken care of. Details are here
If, for example, you are using Rails and you start vagrant with the command vagrant up in your Rails project directory than that directory is available on the VM. Since it is the same shared directory between machines, any changes you make in your Rails project directory on your machine using your regular editor is seen on the VM also. This makes testing in other environments very easy.
Instructions for setting Vagrant up with Windows are here and a RailsCast about it is here. Note that Vagrant has nothing to do directly with Rails - you can use it for setup of any virtual machine environment you need.
In short, you can't.
It is a local host not a public domain therefore not publicly accessible outside of your virtualbox environment.
Maybe someone has a clever hack for this but why would you want to do this in the first place?
Your solution is to either use firefox to browse to your localhost within your virtualbox linux session or develop on windows.
Personally I work the other way round I run Ubuntu 11.04 and I have virtualbox installations of xp, 2,000, me, vista and 7 so I can test in different environments. Inevitably I end up sharing my project folder from Ubuntu so that I can run the project in whatever OS I am testing for.

Apache Tomcat not working in every web browser installed in Windows7 32Bit

I'm working on a web application in JSP and my web container is Apache Tomcat 7.0.2 (Its portable cross-platform version). As I've made extensive use of HTML5-CSS3 and my target browser is Google Chrome, I'm able to run the the Apache server only in Opera web browser, neither of the remaining installed browser run it.
Here's the steps I have followed to start the server in my Windows 7 machine.
-Installed the Apache Tomcat service in Windows from apache-tomcat-7.0.2/bin/service.bat
-Started the service with tomcat7w.exe
-As my default port is 8080, I open 'http://localhost:8080/' in various web browsers, and I could see Apache Server Homepage with same address only in Opera Web Browser (11.01), neither of other browsers installed can open it (Chrome 9, Firefox 4 Beta 11 or IE8) and show standard page not found message.
-I also tried other port numbers, but none of them worked.
What can I do to make Apache run in every browser installed in my computer?
I have my computer dual boot with Windows 7 and Ubuntu 10.10, and in Ubuntu, every web browser installed can run Apache once I start it, but same is not working in Windows.
Update:
I have also tried apache's windows-only installer of version 7.0.8 and changed the port number during installation, but still I can't run it on any other browser expect for Opera...
Any help will be appreciated............
Thanks.
Check your hosts file under C:\Windows\system32\drivers\etc\hosts to make sure that the entry for
127.0.0.1 localhost
is intact. Also see that if you are behind a proxy server, the settings allow for localhost to be bypassed.
Congo!! finally got it done, instead of localhost, it works with 127.0.0.1 (which is localhost anyway)
So those who are facing similar issues, as suggested by adarshr, go through your hosts file to see if localhost is correctly addressed to 127.0.0.1, or if you don't want to edit that file, you can still get it done by simply using http://127.0.0.1:8080/ instead of http://localhost:8080/. Please be sure about port number you are using, in my case it was 8080, it might vary depending on how you've configured.