Results 1 to 5 of 5

Thread: index.html exists but unable to access from browser

  1. #1
    Join Date
    Aug 2012
    Beans
    605

    index.html exists but unable to access from browser

    Hello,
    I have a public domain at 54.201.72.103 (try ping 54.201.72.103 from your terminal; it pings). I have installed tomcat correctly using the following steps:
    Code:
    Got .tar.gz file from http://tomcat.apache.org/download-70.cgi
      tar -xzvf apache-tomcat-7.0.50.tar.gz
      export CATALINA_HOME=/home/ubuntu/receive/apache-tomcat-7.0.50
    
      cd /usr/local
      sudo ln -s $CATALINA_HOME tomcat
    
      cd $CATALINA_HOME/bin
      chmod a+x *.sh
    I have ensured that tomcat is running and active by doing, "wget localhost:8080". This gives me a page called index.html which says that apache tomcat is working. However, if I go to my browser and just type 54.201.72.103 or 54.201.72.103/index.html, it says, "This webpage is not available"

    The strange thing is that, if I do a sudo apt-get install apache2 followed by httpd start. I'm able to access my html files in browser from the public server which are placed in /var/www of the server. However, I do not want to do it using apache2 because my ultimate objective is to run a .war(web archive file) which I understand is to be placed in $CATALINA_HOME/webapps. So I need my webserver has to be the apache-tomcat-7.0.50 which I downloaded and extracted.

    Please find attached my server.xml file from $CATALINA_HOME/conf/server.xml . I have just renamed it as server.txt for the purpose of uploading.

    Thanks
    Attached Files Attached Files
    Last edited by IAMTubby; February 13th, 2014 at 06:00 PM.

  2. #2

    Re: index.html exists but unable to access from browser

    :8080 is the port number. Browsers will try to connect using port 80 if none is specified, so your browser is requesting on the wrong port.

    Try browsing to 54.201.72.103:8080 instead and it should work. (However, it hangs for me, so perhaps not.)

    I don't understand much about tomcat or apache so this is as far as I go.

  3. #3
    Join Date
    Feb 2008
    Location
    Pelican Bay Correctional
    Beans
    Hidden!

    Re: index.html exists but unable to access from browser

    Quote Originally Posted by IAMTubby View Post
    I have ensured that tomcat is running and active by doing, "wget localhost:8080". This gives me a page called index.html which says that apache tomcat is working. However, if I go to my browser and just type 54.201.72.103 or 54.201.72.103/index.html, it says, "This webpage is not available"
    Try 54.201.72.103:8080 or 54.201.72.103:8080/index.html perhaps?
    What's a landing but a take off in reverse?

  4. #4
    Join Date
    Aug 2010
    Location
    Lancs, United Kingdom
    Beans
    1,132
    Distro
    Xubuntu 14.04 Trusty Tahr

    Re: index.html exists but unable to access from browser

    If http://54.201.72.103:8080/ doesn't work (which it doesn't for me), then you probably have a firewall that is preventing external access to port 8080. Is your webserver directly connected to the internet or is it connected via a router?

  5. #5
    Join Date
    Aug 2012
    Beans
    605

    Re: index.html exists but unable to access from browser

    Quote Originally Posted by spjackson View Post
    If http://54.201.72.103:8080/ doesn't work (which it doesn't for me), then you probably have a firewall that is preventing external access to port 8080. Is your webserver directly connected to the internet or is it connected via a router?
    Quote Originally Posted by trent.josephsen View Post
    :8080 is the port number. Browsers will try to connect using port 80 if none is specified, so your browser is requesting on the wrong port.

    Try browsing to 54.201.72.103:8080 instead and it should work. (However, it hangs for me, so perhaps not.)

    I don't understand much about tomcat or apache so this is as far as I go.

    Quote Originally Posted by Habitual View Post
    Try 54.201.72.103:8080 or 54.201.72.103:8080/index.html perhaps?
    trent.josephsen, Habitual, spjackson,
    That was just amazing . Yes, worked of course. Please access the page at http://54.201.72.103:8080. I'm also able to access my application which is placed under the webapps folder in tomcat since it is a war file.

    I have just one more question, how do you access your html files in this setup. As in, where in the tomcat folder structure should I keep an html file so I can access it as http://54.201.72.103:8080/hello.html
    I did try out the steps mentioned in the last post of this page : http://stackoverflow.com/questions/3...page-to-tomcat but it doesn't work.

    Thanks
    Last edited by IAMTubby; February 15th, 2014 at 02:59 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
  •