httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zavelo...@gmail.com
Subject Re: Re: [users@httpd] PHP Not Working
Date Fri, 10 Jun 2011 19:51:40 GMT
J, regarding your statement, "You are allowing apache full access to your  
OS root directory.
Don't do that." I have a follow up question (or several hundred). I looked  
into the output of phpinfo() and saw that the pwd in the 'Environment'  
category = /. Which specifically confirms your point, if I'm not mistaken?  
So I changed the DocumentRoot Directive in the VHost config  
from '/home/zave/Public/new', to '/new', but then the server tells me that  
that directory 'doesn't exist.' What am I doing wrong?

On , Jeroen Geilman <jeroen@adaptr.nl> wrote:
> On 06/09/2011 11:48 PM, Xavier Lopez wrote:


> Hi, I'm using Apache 2.2 on Ubuntu 10.04. I've checked that php mod is

> enabled. It is. I'm using virtual hosts. It serves all html files,

> but not php. Following is my VHost configuration:





> ServerName http://new.dev

> ServerAdmin webmaster@localhost

> DocumentRoot /home/zave/Public/new

> RewriteEngine off





> RewriteEngine on

> RewriteCond %{REQUEST_FILENAME} !-f

> RewriteCond %{REQUEST_FILENAME} !-d

> RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php







> Options FollowSymLinks

> AllowOverride None






> You are allowing apache full access to your OS root directory.

> Don't do that.






> Options Indexes FollowSymLinks MultiViews

> AllowOverride All

> Order allow,deny

> allow from all





> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/



> AllowOverride None

> Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch

> Order allow,deny

> Allow from all





> 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/"



> Options Indexes MultiViews FollowSymLinks

> AllowOverride None

> Order deny,allow

> Deny from all

> Allow from 127.0.0.0/255.0.0.0 ::1/128







> All my VHosts are configured the same way, save for the ServerName and

> DocumentRoot directives. Please help.






> I see nothing related to handling PHP.

> You need to tell apache what to do with .php files.



> This can be implemented - as documented - by adding





> SetHandler application/x-httpd-php





> in your Documentroot Directory block.





> --

> J.





> ---------------------------------------------------------------------

> The official User-To-User support forum of the Apache HTTP Server Project.

> See http://httpd.apache.org/userslist.html> for more info.

> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org

> " from the digest: users-digest-unsubscribe@httpd.apache.org

> For additional commands, e-mail: users-help@httpd.apache.org




Mime
View raw message