Unable to access my webserver (virtual machine, Ubuntu 14.10) through browser - apache

I have setup a Virtual Machine on my Windows 7 system (Ubuntu 14.10). It looks like Apache, MySql and PHP have been installed successfully. If I ran
curl -l 127.0.0.1
I see the website in my console.
But if I hit this address in my browser I just get "This web page is not available".
VM->Settings->Network: I've selected "Bridged Adapter".
Have anyone any ideas what could cause the issue? Any help will be much appreciated. Thank you.

If you are trying to access to 127.0.0.1 it's not gonna work. You have two solutions :
With a bridged interface, go to ubuntu, open a terminal and type ifconfig (it's possible you have to be root for that). Then use the ip displayed.
You can add an host only interface and do the same thing

Related

Cannot install Sourcetree because oAuth redirection page does not load in localhost at port 34106

Trying to install source tree in my Windows 10. They are asking for mandatory BitBucket account and after creating account when I proceed their oAuth, I found state and auth code are being sent like, http://localhost:34106/?state=authenticated&code=CHabzvwrFjNAEzWYCD. But localhost seems not running in my Windows and hence gage loading fails.
There was a temporary DNS error. Try refreshing the page.
Error Code: INET_E_RESOURCE_NOT_FOUND
Anyone faced similar issue? What's the resolution?
Sourcetree seems to be using the Loopback Interface Redirection, which is a recommended solution for Windows.
Your error INET_E_RESOURCE_NOT_FOUND seems to be DNS related, so I would first try if there is something wrong with resolving localhost to 127.0.0.1. Try to ping localhost If it fails (which would be strange), you can add localhost to c:\windows\system32\drivers\etc\hosts:
127.0.0.1 localhost
If localhost is correcly resolved to 127.0.0.1, your firewall may be the problem. I would try to stop if during the Sourcetree installation.
I have Sourcetree installed on my computer, but the installation went without problems, so I'm just writing what I would try to do.

Apache2 Not Responding: Bitnami Magento Install (Legacy)

For reasons too insane to even go into, I am attempting to install using the Bitnami Magento 1.9.2.4 image on a fresh Amazon AWS/Lightsail Ubuntu 16.04 instance (2gbs to avoid complaints and be sure I don't run into anything unnecessary).
I think this is really more of an Apache question. After I finish the install (success), I can't get the server to respond via the instance IP address at the default port (8080).
Regarding the old Bitnami Image, you can get (or wget) that Magento 1.9.2.4 image still, it's over here:
wget "https://downloads.bitnami.com/files/stacks/magento/1.9.2.4-3/bitnami-magento-1.9.2.4-3-linux-x64-installer.run"
So for the sake of anyone who's trying to work through the whole process, once you pull the above down to your instance you need to chmod the above file to 755. This assumes you are in the directory with your download:
chmod 755 bitnami-magento-1.9.2.4-3-linux-x64-installer.run
Then run it using it's full path, like:
/home/ubuntu/bitnami-magento-1.9.2.4-3-linux-x64-installer.run
So the install is going to ask a bunch of questions, for anyone keeping track my answers were all yes (ie. yes to Git, PhpMyAdmin, Beetailer... whatever that is).
Then I created an admin user / password etc.
As far as the port I didn't have anything running on 8080 so the install defaulted the port to 8080 with HTTPS on 8443 with MySQL on 3306 (more on ports in a minute).
I think Host/Domain is one of the keys to this problem. When I couldn't get the server to respond I just recreated an instance and tried a different Domain during the install process. I tried: internal AWS IP, External ACTUAL IP, 127.0.0.1
Here's what the Magento 1.9 Domain prompt looks like:
So basically that sort of brings us up to date.
Once I finished the install, like a normal human used to using bitnami as a cloud image I assumed the server would respond at whatever the default path was at the IP address it was running on. Ie:
BASEIPADDRESS:8080/magento
Not the case. When I hit that the server does NOT respond, hence the question. In addition to the above I have also tried the BASEIPADDRESS, and the BASEIPADDRESS:8080
Results checking open ports
So since the server is not responding I figured I would check the ports.
First I checked using netstat:
netstat -lntu
I got back:
Then I realized that netstat is now depreciated... so I went with:
ss -lntu
I got back:
(excuse the images, formatting wouldn't work for text)
To me it looks like 8080 (default) is open in both of those results. So why isn't the server responding at the default location?
#Bitnami Status = OK
Checking the status with:
/home/ubuntu/magento-1.9.2.4-3/ctlscript.sh status
Everything looks good:
apache already running
mysql already running
Memcached not running
Since it says Memcached was not running, I started memcached to see if that was the issue, no it was not.
I can access the instance via SSH and yes I am sure the IP is right. See images above.
I also posted this to the Bitnami community but haven't heard anything over there. Will cross populate as I get ideas.
It looks to me that you configured Magento using the private IP address, so you would not be able to access from your browser. A way to check it is by executing the following command in your machine:
curl -L 127.0.0.1:8080/magento
If that provides output, then the IP is misconfigured, so you would need to reinstall using the proper IP
So this ended up being PRIMARILY due to not running the Bitnami stack installer as root / sudo:
sudo /home/ubuntu/bitnami-magento-1.9.2.4-3-linux-x64-installer.run
Why Install with Sudo on AWS/Lightsail?
So the reason you need to install as sudo has to do with the fact that when run as the normal user (ie. not root) the installer defaults to port 8080 which is NOT open on aws by default. To complicate matters further you may not be able to get things running properly even if you manually swap to port 80 AFTER you run the installer.
To avoid a scenario where port 80 requires root access to utilize I just re-created my instance and ran the installer as root with the above command.
Host Setting
During install I selected the public IP for the "Host" prompt and everything worked as I thought it might (straight out of the box).
Thanks to Javier Salermon who put me on the right track and the devs at Bitnami for cueing me into the fact that 8080 is not open by default.

How to set virtual host in apache

I am trying to setup the virtual host in apache web server on Ubuntu. For this I followed lot of tutorials and did exactly the same step. But could not find the reason why it is not working for me.
For Now see the following youtube tutorial:
https://www.youtube.com/watch?v=IfRJ4e8UQfQ
I followed this tutorial and did exactly the same as in video. But still when I type testdomain.com on browser it does not show any thing from local machine. Instead of it looks for Internet domain.
Do I need to entry something in host file.
Please guide to find out problem why it is not working for me on ubuntu-14.
Thanks
You need to edit your /etc/hosts file. Append 127.0.0.1 testdomain.com, save and restart the browser.

err_name_not_resolved Win7 Error

I am facing a strange issue on a single PC, all other PC's I have tried are fine so the problem definitely seems localised to this setup.
Windows 7
Google Chrome Version 48.0.2564.82 m
I have developed a simple website on an Apace web server (Windows Server 2012), and assigned it an internal IP address (1.2.3.4), and internal dns name (MyWebsite.MyDomain).
This website is only available within our company. When I type the URL MyWebsite.MyDomain into any browser I am presented with the correct web page, great. When I type the IP address 1.2.3.4 into any browser I am also presented with the correct web page, great again.
This is the case for every PC I have tried so far, apart from one. Instead I am presented with the following error message;
This web page is not available
ERR_NAME_NOT_RESOLVED
Why would this be?
Things I have tried so far on the local PC;
delete history/cache on local PC
ipconfig /flushdns
ipconfig /renew
ipconfig /registerdns
changed to Google public dns (8.8.8.8 / 8.8.4.4)
restart (multiple times)
tried IE and FFOX (same error)
checked hosts file (all looks ok)
The only change I ever made to this individual PC was I installed XAMPP and changed the hosts file (for testing purposes). I have since uninstalled XAMPP and reverted to the original hosts file - could this be the issue? I can't think of any other changes.
I had thought the issue was with my web server setup, but as the web site is accessible from all other PC's it would appear not?
Looks like a re-build may be necessary for this PC, unless somebody can perhaps point me to another suggestion? Any help appreciated.
That machine doesn't happen to have any static ip addressing configured, does it? I'm thinking that perhaps a manual entry for DNS server is conflicting or overriding what DHCP is supposed to be assigning.

Remote port access

I was working on the intranet at work on a virtual machine set up for my project and at some point I have to access it by putting localhost:port number and it works.
Right now I'm home working on it and I can download/upload, use SSH, etc. But I cannot access the same port by putting URL:port number while everything else works.
I'm new to all this so please excuse my ignorance on what could be a very basic subject.<
P.S. the system administrator supposedly gave me full and complete access to the machine, including giving me full firewall permissions. I also have root access via SSH if needed.
THANK YOU!
Try running
ssh -L port:localhost:port remotehost
and then accessing localhost:port as if you were at work.
(n.b. you don't need root access.)