LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-21-2010, 10:53 AM   #1
floweringmind
LQ Newbie
 
Registered: Jul 2009
Posts: 15

Rep: Reputation: 0
Apache2 won't serve php5 in home directory, need advice


Running Ubuntu 10.04

Installed apache2 and php5 and it works in /var/www

but once I point it to a home directory it won't serve php.
Normally I have used phpcgi but I am currently trying to use regular php.

Here is my default file. Any suggestions of what I might be doing wrong would be much appreciated.

Code:
<VirtualHost *:80>
	ServerAdmin webmaster@localhost

	DocumentRoot /home/greensmoothiegirl/public_html
	<Directory />
		Options FollowSymLinks
		AllowOverride All
	</Directory>
	<Directory /home/greensmoothiegirl/public_html/>
		Options Indexes FollowSymLinks MultiViews
		AllowOverride All
		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

    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>
 
Old 05-21-2010, 11:00 AM   #2
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
Is php5 being loaded? What do your access and error logs show for attempting to hit the php file?
 
Old 05-21-2010, 11:12 AM   #3
floweringmind
LQ Newbie
 
Registered: Jul 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Yes php5 is running as it works in /var/www

When I hit a php page the browser downloads it instead of parsing it and there are no errors in the logs
 
Old 05-21-2010, 11:14 AM   #4
floweringmind
LQ Newbie
 
Registered: Jul 2009
Posts: 15

Original Poster
Rep: Reputation: 0
Nevermind I am dumping Ubuntu and going to Debian.
 
Old 05-21-2010, 11:29 AM   #5
rweaver
Senior Member
 
Registered: Dec 2008
Location: Louisville, OH
Distribution: Debian, CentOS, Slackware, RHEL, Gentoo
Posts: 1,833

Rep: Reputation: 167Reputation: 167
heh, typically you don't setup a vhost for each person you want to have a user dir...

you just enable mod_userdir and

UserDir public_html
UserDir disabled root

There is really not a huge difference between debian apache2 and ubuntu apache2... although for servers I far favor debian, for desktops, ubuntu.
 
  


Reply



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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache2 userdir "almost" works - can't serve images directory jpantone Linux - Server 14 07-15-2008 01:25 PM
Annoying AVC Denial of Home Public Directory that I want to serve. algogeek Linux - Networking 4 07-04-2008 03:47 AM
using one machine to serve the home directory and user accounts shishirkotkar Linux - Software 7 05-04-2008 08:42 PM
Apache2+PHP5 won't serve index.php...sometimes! michaelsanford Linux - Software 1 06-11-2006 08:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:04 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration