LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Apache2 won't serve php5 in home directory, need advice (https://www.linuxquestions.org/questions/linux-software-2/apache2-wont-serve-php5-in-home-directory-need-advice-809320/)

floweringmind 05-21-2010 10:53 AM

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>


rweaver 05-21-2010 11:00 AM

Is php5 being loaded? What do your access and error logs show for attempting to hit the php file?

floweringmind 05-21-2010 11:12 AM

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

floweringmind 05-21-2010 11:14 AM

Nevermind I am dumping Ubuntu and going to Debian.

rweaver 05-21-2010 11:29 AM

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.


All times are GMT -5. The time now is 04:34 PM.