Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
HI, this is my first post here, been using linux since June. Anyways, I am a bit confused with Apache. i have it running, but can't figure out what my ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2005
    Posts
    20

    Confused


    HI, this is my first post here, been using linux since June.
    Anyways, I am a bit confused with Apache. i have it running, but can't figure out what my URL is. It says the status is up and running, so err, help please? Thanks!

  2. #2
    Linux Guru bryansmith's Avatar
    Join Date
    Nov 2004
    Location
    /Ontario/Canada
    Posts
    2,619
    Are you trying to view your own webpages from your comp to test them? If so, it is http://localhost/.

    Bryan
    Looking for a distro? Look here.
    "There can be no doubt that all our knowledge begins with experience." - Immanuel Kant (Critique of Pure Reason)
    Queen's University - Arts and Science 2008 (Sociology)
    Registered Linux User #386147.

  3. #3
    Just Joined!
    Join Date
    Aug 2005
    Posts
    20
    Quote Originally Posted by bryansmith
    Are you trying to view your own webpages from your comp to test them? If so, it is http://localhost/.

    Bryan
    Thanks, I got the test page! But, i need to know what my URL is, for the WWW! Also, what is the directory of localhost? Thanks!

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Turn Around
    Posts
    202
    ur URL is ur IP address. type "ifconfig" under root to find it (for debian at least)

    The important file locations for Apache on a Debian system are:

    * Configuration files directory (aka "ServerRoot") - /etc/apache
    * Web page files directory (aka "DocumentRoot") - /var/www
    * CGI scripts directory (aka "cgi-bin") - /usr/lib/cgi-bin
    * Log files directory - /var/log/apache
    * The apache executable file - /usr/sbin
    from apache tutorial on http://aboutdebian.com/internet.htm

  6. #5
    Just Joined!
    Join Date
    Aug 2005
    Posts
    20
    Okay so my URL is http://192.168.0.3/
    However, this * Web page files directory (aka "DocumentRoot") - /var/www folder doesn't exist.

  7. #6
    Linux Newbie deek's Avatar
    Join Date
    Mar 2005
    Location
    Fort Wayne, IN
    Posts
    248
    You need to find out where your httpd.conf file is. Something like /etc/apache/httpd.conf.

    If you can find that (which you will need to find at some point to make any modifications), it will tell you exactly where your document root is. In slackware, the default is /var/www/htdocs. It could be about anywhere though, depending on your distro and particular installation.
    Join the Open Source Revolution. Support GNU/Linux.

    Find me at: www.deeksworld.com
    Registered GNU/Linux User #395777

  8. #7
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Turn Around
    Posts
    202
    i dont think thats your IP.. that will work for you but not me. thats probably the ip for ur router. it will only work for other computers connected to the router. try http://www.whatismyip.com/

    for the documentroot check /usr/local/web/apache/htdocs
    also try lookin in your config file (/etc/httpd/conf/httpd.conf).. it oughtta say in there: so, cat /etc/httpd/conf/httpd.conf (or 'cat /etc/httpd/conf/httpd.conf | more' i dont know if this is needed). hope this helps

    -Dan

  9. #8
    Just Joined!
    Join Date
    Aug 2005
    Posts
    20
    Quote Originally Posted by DoctorDan
    i dont think thats your IP.. that will work for you but not me. thats probably the ip for you router. it will only work for other computers connected to the router. try http://www.whatismyip.com/
    http://68.223.5.113
    However, that isn't working for me. Will it for you? WAC as I try to find the directory.

  10. #9
    Just Joined!
    Join Date
    Aug 2005
    Posts
    20
    Quote Originally Posted by DoctorDan
    for the documentroot check /usr/local/web/apache/htdocs
    also try lookin in your config file (/etc/httpd/conf/httpd.conf).. it oughtta say in there: so, cat /etc/httpd/conf/httpd.conf (or 'cat /etc/httpd/conf/httpd.conf | more' i dont know if this is needed). hope this helps

    -Dan
    none of those existed, not even the config file:
    http://xs42.xs.to/pics/05333/term.png

  11. #10
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    try running

    locate www
    or
    locate htdocs
    (you might have to replace locate with slocate depending on your system)
    90% chance, your web stuff will be sorted in /var somewhere, because /var generaly doesn't contain much more than 10 folders, you can probably just poke around them.

    As for your net address working, first, you probably want to register you IP and get a host name dyndns.org offers a great free service for this. The next big thing you need to worry about is port forwarding.

    If you are behind a nat of some kind, then you need to locate your router, and forward port 80 to your local machine (port 80 is the default http port under some RFC reg somewhere..)

    Another possible problem, is if apache is not configured to listen on all interfaces, check your http.conf or apache.conf and read the comments there, they should help you figure that out. (Or use the GUI config tool that came with your distro if thats more comfortable for you)

    A great way to test if its a TCP/IP issue or apache issue is to use nmap and netstat -tup to check if your machine is listening on port 80 or not.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

Page 1 of 2 1 2 LastLast

Posting Permissions

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