Results 1 to 7 of 7

Thread: Can't install LAMP server on Ubuntu

  1. #1
    Join Date
    Sep 2008
    Beans
    9

    Can't install LAMP server on Ubuntu

    So I have installed Ubuntu a couple days ago, and setup the Xampp package, but was unable to get any web pages -apart from included in Xampp- to display on localhost, because of some permission issue.

    Then I found a detailed guide on how to set LAMP on Ubuntu, so I stopped Xampp & deleted it from the folder /opt. I followed all of the guide's steps but problems persist. I get this error message when I type in the address bar "localhost", even though I don't use Xampp anymore:

    404 Not Found
    The requested URL /xampp/ was not found on this server.

    My question is, how do I display localhost and make sure that my local server installation has been successful? Thanks alot in advance.

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Can't install LAMP server on Ubuntu

    You have to change the document root in /etc/apache2/sites-available/default to:

    Code:
    DocumentRoot /var/www
    Jim

  3. #3
    Join Date
    Sep 2008
    Beans
    9

    Re: Can't install LAMP server on Ubuntu

    Thanks, but I'm afraid my "default" file already includes the code you posted. Here it is:

    Code:
    NameVirtualHost *
    <VirtualHost *>
    	ServerAdmin webmaster@localhost
    	
    	DocumentRoot /var/www/
    	<Directory />
    		Options FollowSymLinks
    		AllowOverride None
    	</Directory>
    	<Directory /var/www/>
    		Options Indexes FollowSymLinks MultiViews
    		AllowOverride None
    		Order allow,deny
    		allow from all
    	</Directory>
    
    	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
    	<Directory "/usr/lib/cgi-bin">
    		AllowOverride None
    		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
    		Order allow,deny
    		Allow from all
    	</Directory>
    
    	ErrorLog /var/log/apache2/error.log
    
    	# Possible values include: debug, info, notice, warn, error, crit,
    	# alert, emerg.
    	LogLevel warn
    
    	CustomLog /var/log/apache2/access.log combined
    	ServerSignature On
    
        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
            Options Indexes MultiViews FollowSymLinks
            AllowOverride None
            Order deny,allow
            Deny from all
            Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>
    
    </VirtualHost>
    Also, I was required during the installation to create a file "localhost" in the same folder that contains "default". Dunno if it could be of any interference but here is its code anyway:

    Code:
    # Based on Drubuntu multisite config file from http://groups.drupal.org/node/6266
    #
    # IMPORTANT!  READ ME!
    # In the VirtualDocumentRoot below, change USER to match YOUR USERNAME
    #
    # What this file does:
    # Configure Apache so that when you browse the local URL http://DOMAIN.localhost/
    # Apache will use the siteroot path /home/USER/workspace/DOMAIN/
    # Remember to add your new DOMAIN.localhost domain to /etc/hosts for 127.0.0.1
    
    <VirtualHost *>
            ServerName localhost
            ServerAlias localhost *.localhost
            VirtualDocumentRoot /home/fouad/workspace/%1/
    </VirtualHost>
    I'm all confused as I still get this error message when entering "localhost":

    Not Found
    The requested URL / was not found on this server.
    Apache/2.2.8 (Ubuntu) PHP/5.2.4-2ubuntu5.3 with Suhosin-Patch Server at localhost Port 80

    Any help is greatly appreciated.

  4. #4
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: Can't install LAMP server on Ubuntu

    I've never had to set up localhost as a virtual server. I haven't installed Drupal lately, but, that doesn't look right to me. Have you tried access your web page using your computers ip address eg:

    Code:
    http://192.168.1.200
    Of course you would have to change the ip address to your computer's ip address.

    Jim

  5. #5
    Join Date
    May 2007
    Location
    Phoenix, Arizona USA
    Beans
    2,909
    Distro
    Ubuntu 8.04 Hardy Heron

    Re: Can't install LAMP server on Ubuntu

    Quote Originally Posted by Epifrin View Post
    So I have installed Ubuntu a couple days ago, and setup the Xampp package, but was unable to get any web pages -apart from included in Xampp- to display on localhost, because of some permission issue.

    Then I found a detailed guide on how to set LAMP on Ubuntu, so I stopped Xampp & deleted it from the folder /opt. I followed all of the guide's steps but problems persist. I get this error message when I type in the address bar "localhost", even though I don't use Xampp anymore:

    404 Not Found
    The requested URL /xampp/ was not found on this server.

    My question is, how do I display localhost and make sure that my local server installation has been successful? Thanks alot in advance.

    Just deleting the application folder does not remove the application.

    How did you install xampp? Did you use apt-get? Or compile from source?

    If you installed from packages using apt-get then you need to do this:

    Code:
    sudo apt-get remove xampp
    -Tim
    www.pcchopshop.net

    Hard to find and obsolete PC and server parts. "If we can't find it, it probably doesn't exist"

  6. #6
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Beans
    15

    Re: Can't install LAMP server on Ubuntu

    My suggestion is to start again use the procedure at http://www.howtoforge.com/perfect_setup_ubuntu_6.06
    You will need to modify that slightly for 8.04, e.g. no need to vi the apache 2 config file. Also do not put the ethernet cable in immediately, let the system fail to set up DHCP then use the manual option. Put the cable in before you do the update. Most other things apply.

  7. #7
    Join Date
    Jan 2006
    Location
    Not heaven... Iowa
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: Can't install LAMP server on Ubuntu

    The 8.04 Perfect Server version.
    A minimal server setup.
    Last edited by Iowan; September 20th, 2008 at 05:56 PM.
    Linux User #415691 Ubuntu User #8629
    Iowa Team (LoCo): [Wiki] [Launchpad]
    IRC channel: #ubuntu-us-ia on irc.freenode.net

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
  •