Apache server not working on public ip address - amazon-ec2

I installed apache2 on ubuntu 16.04. After installing apache when i tried to open apache2 default page using my ip address it is asking for password. I attached screen shot below. I followed this tutorial.
https://www.digitalocean.com/community/tutorials/how-to-install-the-apache-web-server-on-ubuntu-16-04

I have solved the issue. There was a problem in my aws instanace security group. HTTP port was not opened there. I edited it and finally i can see apache2 default page.

Related

VirtualBox redirects to localhost when loading JetBrains Upsource

I've hit a brick wall and can't get past it as there isn't too much information out there on this problem. I have a VirtualBox on my Windows machine running Ubuntu with JetBrains Hub and Upsource installed on it. For making it public I am using apache2. I am able to run 'upsource.sh start' and start upsource ok, however when I try to access the website from an external network, the page gets stuck at 'Loading...' and then fails with '[name of my virtual box] server DNS address could not be found.'.
I am able to access the site from the internal network and everything works fine. I am forwarding a port from my public IP to the virtualbox port that is listening for JetBrains Upsource.
My hint is that the virtualbox is redirecting to itself and the client on the external network cannot reach that address. I am unfamiliar with apache so I'm not sure that it's configuration is setup properly. If anyone has run into this problem and fixed it or if anyone knows how to begin to debug/fix this... I'm all ears.
Thank you guys.
EDIT: The server seems to be hanging when the request for OAuth2 is made. Its making request to the virtualbox's local address rather than the public ip.
To anyone who runs into the problem in the future, I had to reinstall and put in the correct base-url. I'm guessing I was missing some properties that I needed to re configure and I could not find anywhere what all properties that I could configure.

How can I access a webpage located inside a VM from the host machine's browser?

I am able to access the link http://localhost/men/tops-men/jackets-men.html successfully from my VM (configured using X2Go client).
IP Address of the VM: 10.146.106.204
I am also able to ping the VM successfully from my host machine (Windows).
The page that I am trying to access is a php page deployed on Apache Web Server.
However I am not able to do so from my Windows host machine.
I tried http://10.146.106.204/men/tops-men/jackets-men.html from my Windows machine but it did not work.
Do I have to configure something on my host machine or on my VM ?
Not sure what I am missing.
On VM check you can view http://10.146.106.204/men/tops-men/jackets-men.html
If not you need to configure the web server to listen on that IP (if you're running IIS this is under "bindings" in the right-hand side panel of IIS Manager).
On Host open a cmd window and check you can ping 10.146.106.204
If not check your firewall settings on the VM.
If neither of these 2 things help then you need to add more information about your setup to the question. Those are 2 very simple things you can do to diagnose 2 basic problems you might be having.
I was finally able to solve the problem based on this SO link: Unable to access magento site from anywhere but localhost
Updated the DB table core_config_data and updated the data by replacing http://localhost with http://ip-of-vm and then restarted the apache web server.

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

Unable to determine IP address from host name for www.####.com

The squid and pfsense in new for me.
I installed the Packages squid and squidGuard to the pfsense and i enable Transparent proxy from Proxy server and the Proxy filter.
It works correctly, it block my blacklist.
But it is a few sites which is not in my blacklist and could not be retrieved.
I got the following message from browser:
Any idea who to "unblock" these sites?
I find the solution, the sites i got the massage was host in my vpn network and i should check the option "Disable DNS Rebinding Checks" at menu System->Advanced->Admin Access
Apache multiple instances present on Ubuntu.
I think this might be what you are looking for http://wiki.apache.org/httpd/RunningMultipleApacheInstances
For reference of the content in the above link
1) Remove one Apache on your server
sudo apt-get remove apache2

Vagrant 1.5 share feature & Laravel

I have successfully upgraded to Vagrant 1.5 but when I have made a share link like so: http://hard-sloth-1476.vagrantshare.com/ I just get the Apache landing page and not my site. The site is built with Laravel and when I navigate locally to the VM http://192.168.33.11.xip.io it all works fine, but i just get this page:
When using vagrant share
So how does one fix this ?
It appears that you will need to create a virtual host on vagrant for the vagrant share generated url.
It's likely your apache/nginx config doesn't resolve that url to your server. https://httpd.apache.org/docs/2.2/vhosts/name-based.html
You need to specify that your new vagrant share url points to your virtual host on the web server.

Resources