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 strongm 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 apache server through my external IP

Status
Not open for further replies.
Sep 13, 2003
13
US
I have struggled weeks to set my Apache right, so I can access it from a browser
outside of my LAN, but I can't.
I have asked the network administrator of my LAN to forward port 80 to my machine ( where the apache
server sits) and neither the lan or my machine have firework setup.
But I can only access my websites through
LAN IP) from a machine on my LAN,
I still can't access my server through my external IP address:
Here are part of my http.conf, hope someone can help me figure out what's wrong?


#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses (0.0.0.0)
#
#Listen 12.34.56.78:80

Listen 80
#BindAddress *




### Section 2: 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
# <VirtualHost> definition. These values also provide defaults for
# any <VirtualHost> containers you may define later in the file.
#
# All of these directives may appear inside <VirtualHost> containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed. This address appears on some server-generated pages, such
# as error documents. e.g. admin@your-domain.com
#
ServerAdmin jyu1@u.arizona.edu

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If this is not set to valid DNS name for your host, server-generated
# redirections will not work. See also the UseCanonicalName directive.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
# You will have to access it by its address anyway, and this will make
# redirections work in a sensible way.
#
ServerName 68.0.153.19:80

#
# UseCanonicalName: Determines how Apache constructs self-referencing
# URLs and the SERVER_NAME and SERVER_PORT variables.
# When set &quot;Off&quot;, Apache will use the Hostname and Port supplied
# by the client. When set &quot;On&quot;, Apache will use the value of the
# ServerName directive.
#
UseCanonicalName Off

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot &quot;C:/Program Files/Apache Group/Apache2/htdocs&quot;

T.I.A
 
You do not have to have the :80 after the address in the servername field in the http.conf.

 
That might not be the problem, since I have tried it.
Still thanks.
 
there are only two things it could be. if you can get to apache from another desktop machine, than its working on the lan just fine.

here are the two probs ill give you to look at.
1. if apache is on unix, look at that flavors restrictions. they have access lists built on securing the machine.

2. have the lan admin test it him/her self on thier own machine running an ftp server or something. once he/she has that working, they'll be able to make the web server work also.

ps: A portcan on your ip address 68.0.153.19 showed NO ports open. port 80 should be open and you can test this from here -
good luck.
 
Thanks, Ivennard.
I will talk to my lan admin to try these things out, the direction is really helpful.
Jiao
 
The lan on your computer 192.x.x.x needs to be made viewable to the outside. You need to set it up in the DMZ or have the router forward IP requests to it.
 
This is what you need in the httpd.conf:

BindAddress 192.168.x.xxx:80

where this address is the internal IP of your server.

Then set the port forwarding of your router to this address for port 80.

Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Hello Everyone,

This is my first post on this forum, and I a already like it :)

As you can tell I am a complete newbie to Apache. My mission is to setup a web server on my Suse Linux 8.1 box, initially for test purposes, and then if my ISP provider permits, then to allow other poeple to connect to it too....


Anyways, I have taken on board the advice of most forum administrators, in the sense that I looked at all of the post which are likelly to answer my question, in the hope not to bore you with trivial questions.
I have also digested numerous FAQs, and HOT-TOs, together with many google searches on Apache....

And the truth is that I still never get a straight answer to the most basic questions....


My question is: How do I use Apache ?

I have correctly installed it: OK
I have successfully started it as root (apachectl start)
I have also edited the /usr/local/apache/conf/httpd.conf file (after making a backup of course)
and I made some changes:

Listen myipaddress:80
BindAddress *
User Group users
DocumentRoot &quot;/home/RSIA_taehakkyo/usr/rsia/rsias/<Directory &quot;/home/RSIA_taehakkyo/usr/rsia/rsias/<IfModule mod_userdir.c>
UserDir public_html
UserDir www
</IfModule>


In all, I added all of the specifications that anyone else would in my position

Now I have copied one index.html and one cgi script to the ~user/www/ directory and ~user/ directories respectively (N.B I also created these directories)


Now I try to restart the httpd, through apachectl restart, and it indicates that this went OK.

However, when I do this:
lynx
netscape
opera
...

or any other browser with :


I get a default Suse Linux page, and nothing else.



Can someone, please tell me what I am doing wrong, and how I can overcome this issue.


I appreciate any help in this direction.


N.B last question: can I host my website (having bought a domain name) from home ?
what is the procedure ?
what are the pros & cons



Merci beaucoup mes amis !


Da Bionicfysh
 
New Poster, when I put
BindAddress 192.168.100.3:80
in my httpd file, my server can't start any longer, it there any other things I should reset accordly?
Thanks

 
I have the &quot;Listen&quot; directive commented out:

#Listen xxx.xxx.xxx.xxx:80

Try that and restart Apache.



Newposter
&quot;Good judgment comes from experience. Experience comes from bad judgment.&quot;
 
Many thanks to you all,
I removed the second tar.gz version of apache which I had installed by mistake, and now it is running fine :)

now I am just trying to
1-resusutate my pc, and
2-make apache recongize and run the php and java modules that I have installed (but maybe not confugred), but these are other threads....

many thanks again
 
david, you should probably test one of these free webservers here, Then, after you are sure you can see it from the outside world, install apache and configure it.

Correct me if im wrong, but it worked fine for you on the lan, just not from the outside - Right?

at least it will point you in the right direction as to what is not working.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top