#1  
Old 17th September 2009, 15:04
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default suPHP & Joomla

I created a OpenVZ virtual server for the purpose of creating quickly Joomla test sites.

I used Ubuntu 8.04 Template in ProxMox.
After that I followed the Perfect Server Guide for it where it started to actually install packages.

ISPConfig2 seems to work fine except for one small problem.
Sites are created with suPHP permissions but new files/components uploaded with Joomla are created with www-data:www-data as owner.

Any idea where to start to debuging this?

__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Sponsored Links
  #2  
Old 18th September 2009, 11:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Is the Joomla site running with mod_php? Can you post the vhost configuration of the Joomla vhost?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 18th September 2009, 12:32
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

I'm not sure how to check the mod_php use in ISPConfig2.

Here is the Vhosts....

Quote:
root@server51:/etc/apache2/vhosts# cat Vhosts_ispconfig.conf
###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 79.134.125.171:80
<VirtualHost 79.134.125.171:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
</VirtualHost>
#
######################################
# Vhost: www.web13.server51.ic-test.info:80
######################################
#
#
<VirtualHost 79.134.125.171:80>
SuexecUserGroup web13admin web13
ServerName www.web13.server51.ic-test.info:80
ServerAdmin webmaster@web13.server51.ic-test.info
DocumentRoot /var/www/web13/web
ServerAlias web13.server51.ic-test.info
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jspDefault.htm default.htm
Alias /cgi-bin/ /var/www/web13/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web13/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_flag safe_mode Off
<IfModule mod_ruby.c>
<Directory /var/www/web13/web>
Options +ExecCGI
</Directory>
RubyRequire apache/ruby-run
#RubySafeLevel 0
<Files *.rb>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
<Files *.rbx>
SetHandler ruby-object
RubyHandler Apache::RubyRun.instance
</Files>
</IfModule>
<IfModule mod_python.c>
<Directory /var/www/web13/web>
#Options +Indexes +FollowSymLinks +MultiViews
#AllowOverride Indexes AuthConfig Limit FileInfo
#Order allow,deny
#allow from all
AddHandler mod_python .py
PythonHandler mod_python.publisher
PythonDebug On
</Directory>
</IfModule>
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web13/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web13/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web13/user/$1/web/$3
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK)
RewriteRule .* - [F]
</IfModule>
</VirtualHost>
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
  #4  
Old 19th September 2009, 20:31
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Yes, you're using mod_php which means that files uploaded via PHP will be owned by the Apache user and group (which is www-data on Debian/Ubuntu).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 19th September 2009, 21:09
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Default

Where can I find HowTo change it to suPHP?
I used this howto...
http://how2forge.net/perfect-server-ubuntu8.04-lts-p6
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 19th September 2009 at 21:13.
Reply With Quote
  #6  
Old 20th September 2009, 18:04
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

http://www.howtoforge.com/install-su...2.20-and-above
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #7  
Old 20th September 2009, 22:42
_X_ _X_ is offline
Senior Member
 
Join Date: Oct 2008
Posts: 247
Thanks: 8
Thanked 37 Times in 35 Posts
Lightbulb

I suggest using new version of suPHP since 6.2 had a rather nasty security problems with symlinks.

http://www.suphp.org/download/suphp-0.7.1.tar.gz

is the latest at the moment.

btw ... what are advantages of suPHP, except file owner issue. Are there any problems that suPHP can cause?

How suPHP is updated after this install?

Can apt-get update it automatically?
Reply With Quote
  #8  
Old 22nd September 2009, 09:34
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
Thumbs up

Did not work with that version.
I got it to work with these commands...

Quote:
First we disable the normal PHP5 module (as root):

a2dismod php5
/etc/init.d/apache2 restart

Then we install the prerequisites needed to build mod_suphp:

apt-get install php5-cgi apache2-prefork-dev

Now we can download and build suPHP as follows:

cd /tmp
wget http://www.suphp.org/download/suphp-0.6.3.tar.gz
tar xvfz suphp-0.6.3.tar.gz
cd suphp-0.6.3
./configure --prefix=/usr --sysconfdir=/etc --with-apache-user=www-data --with-setid-mode=paranoid --with-apxs=/usr/bin/apxs2
make
make install

Finally we add the suPHP module to our Apache configuration...

vi /etc/apache2/httpd.conf

LoadModule suphp_module /usr/lib/apache2/modules/mod_suphp.so
ALSO REMEBER TO ADD THIS LINE FOR APACHE / ISPCONFIG...
(Other wise browser / server wants to download the php files.)

vi /etc/sysconfig/apache2

[...]APACHE_MODULES="actions alias auth_basic authn_file authz_host authz_groupfile authz_default authz_user authn_dbm autoindex cgi dir env expires include log_config mime negotiation setenvif ssl suexec userdir rewrite ruby"[...]

Thanks for all your help.

I wonder what is the last suPHP version that works with this?
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent


Last edited by SamTzu; 22nd September 2009 at 09:39.
Reply With Quote
  #9  
Old 23rd September 2009, 14:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,735 Times in 2,571 Posts
Default

Take a look at this comment if you want to use a newer suPHP version: http://www.howtoforge.com/install-su...#comment-19457
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #10  
Old 2nd October 2009, 21:13
SamTzu SamTzu is offline
HowtoForge Supporter
 
Join Date: Apr 2007
Location: Helsinki
Posts: 426
Thanks: 33
Thanked 55 Times in 38 Posts
Send a message via Skype™ to SamTzu
 
Default

I tried that. It did not work with suPHP 0.7.1.
For some reason after upgrade the server gives 'Ineternal Server Errors.'
It complains about a fault in the suPHP installation script.
__________________

Sami Mattila
Internet-Content

Telephone:
00358942833310
Email: firstname.lastname@internet-content.org
Shop: http://shop.internet-content.net
Site: http://www.internet-content.net
Blog: http://www.internet-content.net/en/blog
FB: https://www.facebook.com/internetcontent

Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with ISPconfig / joomla tremor General 4 31st May 2009 23:35
suPHP, Joomla! 1.5, file & diretory permissions pjdevries Installation/Configuration 17 19th June 2008 02:58
Joomla + suPHP + ispconfig + Etch causes too many processes! Insane1 HOWTO-Related Questions 4 11th May 2008 17:51
chrooted ISPConfig with suPHP & Joomla phpmail settings. SamTzu Installation/Configuration 14 6th May 2007 11:54
ubuntu ispconfig joomla .htaccess steve1084 General 8 6th January 2007 15:55


All times are GMT +2. The time now is 07:44.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.