• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

How to switch off php with suPHP (/var/www/vhosts/.skel/0/conf/vhost.conf)

P

pichlo

Guest
Hi everybody,

I successfully installed suPHP on my machine (debian, plesk 8.3.0). I decited to active suPHP in generell by via global apache configuration to reduce administration time (98% of my customers uses php).

# vi /etc/apache/mods-enables/suphp.ini
<IfModule mod_suphp.c>
AddHandler x-httpd-php .php .php3 .php4 .phtml
suPHP_Engine on
</IfModule>

Now I recognized, that there is no way to disable php support for single domains by plesk. Because plesk wrap this configuration commands for mod_php4 and mod_php5 but not for mod_suphp. The only way I found is manual over specific vhost.conf files:

# touch /var/www/vhosts/<DOMAIN>/conf/vhost.conf
# vi /var/www/vhosts/<DOMAIN>/conf/vhost.conf
<IfModule mod_suphp.c>
suPHP_Engine off
RemoveHandler .php
</IfModule>

Now I found a documentation to create a skeleton vhost.conf for new domains:

# mkdir /var/www/vhosts/.skel/0/conf/
# touch /var/www/vhosts/.skel/0/conf/vhost.conf
# vi /var/www/vhosts/.skel/0/conf/vhost.conf
<Directory /srv/www/vhosts/@domain_name@/httpdocs>
...
</Directory>

# /usr/local/psa/admin/sbin/websrvmng -a -v
# /etc/init.d/apache restart

Of course I could create specific vhosts for existing domains, too. So far.... now my questions:

1.) Are there switches, I could use in spezific domain-vhosts like /var/www/vhosts/<DOMAIN>/conf/vhosts.conf, too? For example anything like "@php_on_or_off" ?

2.) Can I expand the automatic created /var/www/vhosts/<DOMAIN>/conf/httpd.include files by a new part "<IfModule mod_suPHP>" with the same code like mod_php4 or mod_php5? Is there a skeleton file for these file, too?

3.) Are there more switches like "@domain_name@" for the skeleton vhosts.conf?

Or in generell: Where can I found a documentation about this stuff?

Thanks in advance
Martin
 
@domain_name@ is the only variable supported in skeleton vhost.conf files. For anything else you need to use an event handler for "physical hosting created" that will create the vhost.conf file and lookup any additional variables you need.
 
The alias for the semaphores doesnt work
ipcs -s | grep apache | perl -e 'while (< STDIN >) { @a=split(/s+/); print pcrm sem $a[1]}'

However this worked for me
Code:
for i in `ipcs -s | grep apache | awk ‘{print $2}’` ; do ipcrm -s $i; done
 
Back
Top