Linux Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsOperating SystemsLinux Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 30th, 2011, 01:14 PM
jaeSun jaeSun is offline
got Rice?
Dev Shed Novice (500 - 999 posts)
 
Join Date: Nov 2004
Posts: 509 jaeSun User rank is Private First Class (20 - 50 Reputation Level)jaeSun User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 7 h 39 m 38 sec
Reputation Power: 9
Problems Installing LAMP on Ubuntu Server 11.10 64bit

This is kind of long, but wanted to be thorough. I am trying to install LAMP on the Ubuntu Server to setup my own local LAMP box on the network. But once I finish everything, whenever I go to a php page, it prompts for a download. I think have tried everything to make sure every I did all the steps right. Not sure what is going wrong or if I missed something?

Information:
- Installing on a VM, Oracle VirtualBox (Created new VM using default settings, Linux Ubuntu 64 Bit). I have the VM using a bridged network connection, with its own static IP set (set in the router)
- Ubuntu Server 11.10 64-bit, barebones install, did not install LAMP or anything else during the Ubuntu Install.

Steps I took:

Once logged in, I installed LAMP, using this: https://help.ubuntu.com/community/ApacheMySQLPHP

$: sudo apt-get install tasksel
# tasksel looked to already have been installed
$: sudo tasksel install lamp-server

Once I did that, I setup apache.

I then setup the public_html directory. But I have that elsewhere on the network. So I Installed Samba, mounted the share at /mnt/localwww, then went into my /etc/fstab file and had it auto mount on boot

//192.168.1.101/www-dev /mnt/localwww smbfs username=USERNAME,password=PASSWORD, 0 0

Then I created a symbolic link to the mount to the public_html directory

$: ln -s /mnt/localwww /home/jaesun/public_html

From there, I setup apache2, using this:
http://kimbriggs.com/computers/comp...irectories.file

$: cd /etc/apache2/mods-enabled
$: sudo ln -s ../mods-available/userdir.conf userdir.conf
$: sudo ln -s ../mods-available/userdir.load userdir.load
$: sudo /etc/init.d/apache2 restart

I modified my host file in my own machine, to point to the Ubuntu server (statically set to 192.168.1.104), so that http://dev/ will go to my local LAMP server.

I then went to /etc/apache2/sites-available and created a VirtualHost entry

$: cd /etc/apache2/sites-available
$: vi dev

and input this:

Code:
<VirtualHost *:80>
    ServerName dev
    DocumentRoot /home/jaesun/public_html
</VirtualHost>


then:

$: cd /etc/apache2/sites-enabled
$: sudo ln -s ../sites-available/dev dev
$: sudo /etc/init.d/apache2 restart

Lastly, I then went to /etc/apache2/ directory, and modified httpd.conf (I have done this to apache2.conf also) to add this:

Code:
<FilesMatch \.php$>
    SetHandler application/x-httpd-php
</FilesMatch>


then

$: sudo /etc/init.d/apache2 restart

Tested it out, got the php download prompt.

Found:
http://www.howtogeek.com/howto/ubun...ache-on-ubuntu/

$: sudo a2enmod php5
# Stated that this library was already enabled, I restarted apache anyways
$: sudo /etc/init.d/apache2 force-reload

Cleared out my browser history/cache.

Still got the download prompt.

So this is where I am now currently. I have installed Ubuntu Server twice in VM, first time, installing LAMP Server during the install, and the second time, doing a barebones install, both times, getting the same results with the download prompt.

I can view html files fine, view directories in the home directory. But once I view a php file, it prompts to save the download.

I am pretty sure php is installed. I can go to the command line, and do

$: php /home/jaesun/public_html/test/test.php

and it'll output the php/html in test.php (<? echo 'test'; ?> hi)

Did I miss a step somewhere? Am I doing something wrong? Almost wanted to throw the monitor out the window! Any help would be appreciated

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsLinux Help > Problems Installing LAMP on Ubuntu Server 11.10 64bit

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap