Find the answer to your Linux question:
Results 1 to 8 of 8
Okay, still frustrated here. I am assuming that the default HTML directory for Apache2 using Ubuntu 6.06 is /var/www/apache2-default, is this correct? I post a Web site in this directory ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637

    Default HTML Directory, Ubuntu 6.06


    Okay, still frustrated here. I am assuming that the default HTML directory for Apache2 using Ubuntu 6.06 is /var/www/apache2-default, is this correct? I post a Web site in this directory and still receive the directory tree when browsing this server via Web Browswer. Then, once I click apache2-default I am greeted with my Web site. As previously stated, this is a bit strange since other Linux distros have a default publication directory and once copied displays the Web site. I have also edited /etc/apache2/apache.conf to include index.htm for directory root. Any ideas as to how I'm hosing this up?

    I'm getting a little frustrated here.

  2. #2
    Linux Engineer jledhead's Avatar
    Join Date
    Oct 2004
    Location
    North Carolina
    Posts
    1,077
    if you browse to your website http://localhost and it shows apache-default as a clickable link, then try putting your website stuff in /var/www/ and then reload your website. it looks like var/www is your root and apache-default is a directory being served.

  3. #3
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    Thanks, jledhead, that did the trick. Now, I have one remaining issue. When I issue the command /etc/init.d/apache 2 start/stop/restart I am receiving the following error "Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName." Where do I rectify this error?

  4. #4
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Quote Originally Posted by gtmtnbiker98
    "Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName."
    Is your machine present in /etc/hosts?
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  5. #5
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    I only see the following entries in the hosts file:

    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts

    Just for info, my hostname for this box is ubuntu. I checked the /etc/hostname file and it reflects the hostname of ubuntu correctly. Ideas?

  6. #6
    Linux Enthusiast
    Join Date
    Dec 2004
    Posts
    637
    Forgot to mention, I have experienced this same problem with my Debian installation as well. It must be something that I'm missing on these Debian machines. My SuSE and CentOS machines configure first time. Perhaps if I can only narrow down my setup glitch then I will be a happy camper.

  7. #7
    Linux Guru antidrugue's Avatar
    Join Date
    Oct 2005
    Location
    Montreal, Canada
    Posts
    3,211
    Quote Originally Posted by gtmtnbiker98
    Just for info, my hostname for this box is ubuntu. I checked the /etc/hostname file and it reflects the hostname of ubuntu correctly. Ideas?
    Then you would need a line like this one in your /etc/hosts file :
    Code:
    127.0.0.1       localhost.localdomain   localhost       ubuntu
    "To express yourself in freedom, you must die to everything of yesterday. From the 'old', you derive security; from the 'new', you gain the flow."

    -Bruce Lee

  8. #8
    Just Joined!
    Join Date
    Jul 2006
    Posts
    1
    Just saw the post, so I'm sure that the issue's been fixed. However, I thought I'd post the solution so others could find it more easily.

    You need to add your ServerName to the apache2.conf file. Here's what I did:
    Code:
    sudo gedit /etc/apache2/apache2.conf
    Then add the following 2 lines at the bottom (replace myserver with your hostname).
    Code:
    # Added ServerName to avoid the could not determine FQDN error
    ServerName myserver
    Then you can restart the server:
    Code:
    sudo /etc/init.d/apache2 restart
    ...now notice no errors! Enjoy!

Posting Permissions

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