Unable to access Apache Vhost - apache

I'm running apache through a clean Ubuntu server VM on Parallels for Mac. I have it set up following this tutorial
But when I try to access it from my mac, I get no response. Ping returns a response, but not viewing the page in chrome.
Here is my vhost file ccminecraft.com.conf
I also tried putting in
192.168.1.108 ccminecraft.com
192.168.1.108 www.ccminecraft.com
into my hosts file on my mac, but that didn't work. nslookup returns that it's searching on google's DNS, which both my mac and router are configured to use. But shouldn't it be going to 192.168.1.108 instead of doing a DNS lookup?

Try telneting the port 80 on your ip#
telnet 192.168.1.108 80 if it doesn't respond you need to reconfigure your firewall or disable it.
service iptables stop
systemd --> systemctl stop firewall
Before usig DNS try with ip# so in :
ServerName put yout_ip# if it works you need to disble the adapter that link you to the internet and just let VM adapter enabled

Related

apache2 not working with port other than 80

I have nginx running at port 80.
After installing apache2, I set its port to 82 (both in ports.conf and 000-default.conf).
I have tried opening the ip (i.e a.b.c.d:82) but its not opening. But if I set port to 80 and stop nginx then its opening.
I tried opening ip with the below format:
a.b.c.d:82
a.b.c.d - opening nginx site
I also tried setting dns to abc.mydomain.com and opened
abc.mydomain.com (opening nginx site)
abc.mydomain.com:82 (not opening anything)
How to access it using apache with some port other than 80 ?
Please let me know for more questions.
Thanks.
The discussion and investigation in the chat revealed that this actually was about a remote system, not a local development setup. That means that typically a package filter ("firewall") is in between client and sever. When using a non standard port for a "well known protocol" you need to open that port in the servers firewall for incoming traffic.
In this case using Ubuntu's ufw tool had been used to setup a simple package filter. Configuring the custom port 82 and allowing incoming traffic to it solved the issue at hand.

Accessing apache2.4 server through WiFi / WLAN inside home network

I have netgear 1500 wifi DSL router having private IP 192.168.1.1. I am running apache 2.4 in my desktop PC having IP 192.168.1.2 and my laptop has an IP 192.168.1.3. While I try to access the apache server as http://192.168.1.2:80/index.html I get a message requested URL /index.html not found, while it shows up properly when I access is as localhost.
I have done port forwarding for port:80 and firewalls are stopped.
I have quickheal running in the same machine in which apache runs. Both machines are windows.
What do I need to do so that I can access the server from my laptop?
I have added the privileges through http.conf also.
I see another problem - when I ping the desktop machine, which runs the server, the request is timed out.
Thanks
The problem has been solved. Skype and antivirus are using port 80. Making apache listen to other port - like 8080 solved the problem.
I learned that apache "does not" share a port with other applications.
Hope someone else might be helped from this.
Sukalyan

Apache named virtual host not working after changing port

I have a jboss server and an apache web server on the same machine. Jboss has to stay listening on port 80, so I had to switch which port apache listened on. Before, when it was listening on port 80, everything worked fine. I set up a virtual host for a website I'm working on, and I was able to use the URL for that site as a I defined it in the virtual host file and my hosts file (I'm using Windows). After I changed the port it listened on, I get the following error:
Problem loading page: Unable to connect
I've restarted the server, restarted my machine, changed the port to several different numbers that weren't being used for anything else, and I even tried changing the localhost IP address from 127.0.0.1 to 127.0.0.2 to see if that would help, but none of this has worked. I changed the port in both httpd.conf and httpd-vhosts.conf, but nothing has really worked. I checked the IP address for the site with ping, and it showed that I'm using the right one. I would really appreciate some help because nothing is working.
Likely a local firewall issue. You should only need to change Listen, ServerName and <virtualhost>. You can use lsof or netstat to confirm the listening port.

Cannot access to web server via local IP address on UBUNTU 12.10

Recently I've install Ubuntu 12.10 on my dev machine. also I've installed apache 2.2 &
Php 5.3.8 and Php 5.2.17 and MySQL. Everything works fine and I can browses my sites and projects via 127.0.0.1 & Localhost keyword and Hostname But I cannot access my sites or Apache web server via Local ip address (192.168.1.5).
I run this model on Laptop with Ubuntu 11.10 and can access via 192.168.1.x.
Do you have any idea about this issue please let me to know your XP in this case ?
thanks a million about your patient...
Farzam.
Perhaps your Apache is bounded to localhost only. Look in your Apache configuration file
(httpd.conf) for
Listen 127.0.0.1:80
and replace it with:
Listen 80
or
Listen *:80
Also check the Firewall settings, look for a the line below in the same file:
Allow from 127.0.0.1
and try changing it to:
Allow from all
You should replace the listen line as shown below:
Listen 0.0.0.0:80
Try:
sudo ufw allow from 192.168.1.5
I add Directory tag:
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
Windows Firewall did not have an exception for port 80.
Somehow IIS worked fine, but would not allow Apache port 80. Even disabling the Windows Firewall Service did not allow it.
Search Windows for "Firewall" and Create a new rule. Choose Port, enter 80, Call it: HTTP or whatever, Save. Restart Apache service.
in my case i work on nestjs and
previously i run my project on app.listen(3001) like this
first i change to this app.listen(3001,'192.168.xx.xx')
now i want to access my project on the another computer using ip on the network (LAN)
so it is now allow us to access any particular port after ip address
means if i access 192.198.xx.xx then i can access the address.
but if i append port like this 192.198.xx.xx:3001 then it not let me allow to access ip address so in this case i resolve my problem by run following cmd
sudo service ufw stop
sudo iptables -nvL
sudo iptables -nvL|less
sudo iptables -F
"Windows Firewall did not have an exception for port 80. Somehow IIS worked fine, but would not allow Apache port 80. Even disabling the Windows Firewall Service did not allow it.
Search Windows for "Firewall" and Create a new rule. Choose Port, enter 80, Call it: HTTP or whatever, Save. Restart Apache service." - This worked for me. After I enabled the ports 8080 on the firewall on Win Server 2012 (I use port 8080).

Sharing Apache Server with the Internet?

I installed Apache with WAMP. I want to make my computer as a server for my web page for make some experiment on my web site.But I can`t open my server in Internet. I can see it in http://localhost/mysite/index.html but when I try to reach it in another computer like http://myserverip/mysite/index.html it says server not responding. I am using wireless router and also forwarded to my LAN ip.
A few ideas:
check that apache is bound to your PC's internal IP rather than just localhost - run netstat -an and verify that you have local address 0.0.0.0:80 not 127.0.0.1:80
check that you're definitely forwarding port 80 from the router to your PC
check that you're not firewalling off the traffic, i.e. make sure there's an exception in the windows firewall for port 80 (and 443 if you're using HTTPS), or a program exception for httpd, or even try turning off the firewall temporarily whilst debugging this
find out if your ISP is blocking this - some won't let you run web servers from your home connection; you could try a different web port to see if that helps?
try connecting from some other machine - there could be some proxy configuration that's upsetting looping back into your PC