Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: webserver problem

  1. #1

    webserver problem

    hi guys,

    i'm running a linux webserver that acts as a router for my internal network on a cable modem. Internally, the webserver is running fine. A friend of mine in the internet zone was also able to access, but other than him, all others couldn't access my webserver.

    The ff. are the iptables script i used to enable the webserver outside the internet zone

    #-----------------------------------------------------------
    # FIREWALL RULES
    #-----------------------------------------------------------

    # Allow previously established connections

    iptables -A OUTPUT -p tcp -o eth0 -m state --state \
    ESTABLISHED,RELATED -j ACCEPT

    iptables -A INPUT -p tcp -i eth0 --dport 22 --sport 1024:65535 \
    -m state --state NEW -j ACCEPT
    iptables -A INPUT -p tcp -i eth0 --dport 80 --sport 1024:65535 \
    -m state --state NEW -j ACCEPT

    -------------------------------------------------------------

    I can do an ssh connection in the internet zone, as well as query the
    domain name through nslookup and dig (i have used ddclient with dyndns.org),
    but i couldn't show the main page in the web browser...

    "The page cannot be displayed
    The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings. "

    Aprreciate your help on this...

    ---> The rocketman

  2. #2
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    What webserver are you running? Apache? If then, what version? 2.0? 1.3?
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  3. #3
    Thanks for replying Compunuts... the version is:

    # httpd -v
    Server version: Apache/2.0.52
    Server built: Jan 30 2006 00:41:38
    Last edited by rocketman; 04-16-2006 at 09:47 AM.

  4. #4
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    So if you are on the webserver box and if you type http://your.ip.addy.here , then it will show the site that you wanted to see? I would also assume that you have followed OpenFree tutorial about Apache . Still having problem then? If so we will need to look at iptables stuff.
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  5. #5
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    Okay, I've re-read your post.... sorry for all those nonsense questions.

    Quote Originally Posted by rocketman
    A friend of mine in the internet zone was also able to access, but other than him, all others couldn't access my webserver.

    <snip>

    (i have used ddclient with dyndns.org),
    but i couldn't show the main page in the web browser...
    It looks to me like DNS problem than any other. If you use dyndns service, it is possible that their server response was slow. Get the external IP address (with "ifconfig eth0" command) and ask your friends to type in IP address manually. If they can see the site that way, then it's not your config problem but DNS problem.
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  6. #6
    hi compunuts,

    we've already tried it also -- using the ip, but i still cannot access, i just dont understand why only one of my friends in the internet zone can access while others cannot...

    Anyways, i tried disabling the iptables for a while, but the main page still is inaccessible. so i guess it's not the iptables then ... im currently using startcom linux (www.startcom.org), which is based on redhat el 3.0,...
    Last edited by rocketman; 04-17-2006 at 02:50 AM.

  7. #7
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    Quote Originally Posted by rocketman
    i just dont understand why only one of my friends in the internet zone can access while others cannot...
    It probably is locally cached copy of the content.

    Anyways, i tried disabling the iptables for a while, but the main page still is inaccessible. so i guess it's not the iptables then ...
    Did you enabled the site? Follow the link I gave you above post. It will explain how to do it. You need to verify it first then we can go from there.

    Post the content of your apache config file for the site you are trying to do. It should be in ~/site-enabled/ directory.
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  8. #8
    Hi Compunuts,

    These are the config from httpd.conf that I have modified. I didn't use virtual hosts. As said, i can access the webserver inside the lan, while outside the lan, nobody can access, except 1 friend i know who says he can see the welcome page.

    #
    # 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 apolloonline.homeip.net:80

    #
    # 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 apolloonline.homeip.net:80

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

    UseCanonicalName On

    DocumentRoot "/var/www/html"

    <Directory />
    Options FollowSymLinks
    AllowOverride None
    </Directory>

    <Directory "/var/www/html">

    Options Indexes FollowSymLinks Multiviews
    AllowOverride None
    Order allow,deny
    Allow from all

    </Directory>

    DirectoryIndex index.html index.html.var index.php main.php

  9. #9
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    Quote Originally Posted by rocketman
    These are the config from httpd.conf that I have modified. I didn't use virtual hosts.
    This IS the major mis-understanding about Apache 2.0 from 1.3. Whether you have one web site or hundreds, you still use site-enabled and site-availabled tools. Please follow this steps to configure your site and then post back. Make sure the file you are editing is "/etc/apache2/site-enabled/default" file.. DO NOT use httpd.conf file. It is there just for compartibility and Apache2 no longer make use of it.

    Quote Originally Posted by rocketman
    # 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 apolloonline.homeip.net:80
    This MUST be IP address and not host name. IF you use dyndns, then leave this bind of all interfaces such as "Listen *" and "Port 80". Actually you do not need to specify port. Apache default to port 80.

    ServerName apolloonline.homeip.net:80
    No port config is needed. Just your server name "apoloonline.homeip.net"

    HTH ...
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  10. #10
    hi Compunuts,

    I cannot invoke the commands mentioned in your tutorial namely:

    * a2enmod - To enable modules
    * a2dismod - To disable modules
    * a2ensite - To enable sites
    * a2dissite - To disable sites

    is this applicable for redhat based distributions also?

Similar Threads

  1. webserver
    By aimseeker in forum Linux Distros
    Replies: 2
    Last Post: 02-11-2010, 04:53 PM
  2. My Webserver
    By beezlebubsbum in forum Linux - Software, Applications & Programming
    Replies: 18
    Last Post: 08-23-2005, 06:19 AM
  3. problem trying to set up webserver
    By terry_5454 in forum Linux - General Topics
    Replies: 2
    Last Post: 01-10-2005, 10:38 PM
  4. WebServer
    By vwgtiturbo in forum Linux - Software, Applications & Programming
    Replies: 16
    Last Post: 10-23-2003, 05:30 AM
  5. Webserver
    By trickster in forum Linux - Hardware, Networking & Security
    Replies: 7
    Last Post: 08-27-2002, 01:24 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •