Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can I access my server using my IP address

Status
Not open for further replies.
Sep 13, 2003
13
US
how can I access my server using my IP address
There is a totally newbie question.
I have installed my apache and everything seems to work fine except I can't see the webpages using my IP address:
Say but when I use or
then it works fine.
Just wonder how can I use my IP address to access my docs under htdocs of my Apache server.
T.I.A.

Jiao
 
Are you on a network or directly connected to the internet?

If your on a network and have a router, you must port forward port 80 to the machine running the server.

In either case, if you have a software firewall, you'll need to open port 80.

And lastly, if your ISP blocks port 80, you'll need to find an open port and set your httpd.conf to that port as well as making sure the above is accomplished for your new port.

 
I am on a lan, and the router is not at my home, how can I forward port 80 to the router?
Thanks,
 
Depends on the router and general setup of the network. For instance a Linksys router is addressed by the ip of 192.168.1.1, which will produce a login page. Once logged in you have all the options you need to forward ports or set a computer as a DMZ (all ports forwarded). One problem is that if someone else already has port 80 forwarded to their computer, you'll need to use another port and set your server for that port. All of this assumes that you want to access your server from outside of your network. If you want to access if from inside of your network you can use its network ip or machine name.
 
Most probably you dont have your IP address in your hosts file?

Laurie.
 
For current stage, I just want to access my server through my own machine using my IP address ( i.e. 68.0.153.19), so how should I configure my httpd.conf? Is the virtual host part I should change? I tried several configurations but it still won't work. Here is how I did it:

NameVirtualHost 68.0.153.19:80

#
# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.
#
<VirtualHost 68.0.153.19>
# ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /htdocs/test
ServerName BigDell.tc.ph.cox.net
# ErrorLog logs/dummy-host.example.com-error_log
# CustomLog logs/dummy-host.example.com-access_log common
</VirtualHost>

Thanks so much.
 
Whats your OS &quot;Linux, Win2k, XP ???
The settings you have appear ok for an IP based virtual host.

Laurie.
 
I assume you are restarting and reloading apache after you make changes and port is set to 80 in you conf. Can anyone on your network use your ip to access your site? What is your operating system?
 
My os is windows XP Home edition. I will try to access my IP from another computer on my network to see the result.
Jiao
 
Today I ask my friend ( who has the router for our LAN) to forward port 80 to my machine, now it can use
192.168.100.3 ( my IP on the LAN) to access my web server.
But I can't access it by using to acess it.
So I just wonder what might be wrong?
Thanks so much.
Jiao
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top