Find the answer to your Linux question:
Results 1 to 8 of 8
Hello everyone! I'm working with a friend of mine to get our first server up and running. We have about a dozen sites and are having trouble getting the virtual ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    9

    First time trying to set up a server... and it's not going well.

    Hello everyone!

    I'm working with a friend of mine to get our first server up and running. We have about a dozen sites and are having trouble getting the virtual hosting to work. Since we have never done this before I'm sure we are missing something very basic here.

    We have followed multiple guides and installed Fedora 12 and Apache2. We have edited the httpd.conf file and added virtual.conf, but when we go to enable the site with 'a2ensite' we get an error, 'a2ensite command not found.'

    Like I said, I'm sure this is a simple error. Any help is greatly appreciated!

  2. #2
    mzv
    mzv is offline
    Just Joined!
    Join Date
    Aug 2009
    Location
    Evil Empire
    Posts
    33
    where do you type this command? Does your Apache server works with one site? (with no any virtual hosts configuration)

  3. #3
    Just Joined!
    Join Date
    Mar 2010
    Posts
    9
    We're not trying to execute the command in any specific user, but we are logged in as root.

  4. #4
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    What the 'command not found' error means is that file a2ensite isn't in any of the directories specified in the PATH variable.

    You could try:
    Code:
    whereis a2ensite
    But I doubt it'll work. If it does you'll have to specify the path to run it, as listed below.

    You'll have to use the brute force method:
    Code:
    find / -type f -name a2ensite
    That'll search your entire disk. Once/If it finds it it'll list the full path like:
    /path/to/a2ensite

    So to run it you have to specify the path as well:
    /path/to/a2ensite

  5. #5
    Just Joined!
    Join Date
    Mar 2010
    Posts
    9
    It returned nothing. Any other ideas? Is this even the right command to use to enable the sites? We have a completely fresh install and have only added the virtual.conf file.

  6. #6

  7. #7
    Linux Guru coopstah13's Avatar
    Join Date
    Nov 2007
    Location
    NH, USA
    Posts
    3,149
    my only recommendation is to switch from fedora to a more server oriented distro like centos, F12 has a very short lifecycle, and having a non-up-to-date system is not a good idea especially with a web server

  8. #8
    Just Joined!
    Join Date
    Mar 2010
    Posts
    9
    I didn't find out how to make the virtual hosts work, but I got the main site to work. I commented out

    Code:
    #Include conf.d/*.conf
    This is what /etc/httpd/conf.d/virtual.conf contains

    Code:
    #
    #  We're running multiple virtual hosts.
    #
    NameVirtualHost *

Posting Permissions

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