1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Changing DocumentRoot

Discussion in 'Plesk 11.x for Linux' started by NicholasEvans, Dec 17, 2012.

  1. NicholasEvans

    NicholasEvans New Pleskian

    10
    35%
    Joined:
    Dec 17, 2012
    Messages:
    6
    Likes Received:
    0
    Hi,

    I've got several sites that all run from the same document root but require separate mail accounts.

    I've read that the best way to do this is to set up another site (or webspace) for the domain and then change the DocumentRoot in the vhost.conf file.

    I've been trying to do this but don't seem to be able to get PHP to run on the new host once I've created vhost.conf.

    I tried:
    Code:
    <Directory /var/www/vhosts/example.com/httpdocs>
    Options -Includes -ExecCGI
    </Directory>
    DocumentRoot /var/www/vhosts/example.com/httpdocs
    
    But the site just downloads the php file.

    Any suggestions would be appreciated.

    Kind regards,

    Nick
     
  2. NicholasEvans

    NicholasEvans New Pleskian

    10
    35%
    Joined:
    Dec 17, 2012
    Messages:
    6
    Likes Received:
    0
    Have also tried the following but I just get the default apache test page

    Code:
    DocumentRoot /var/www/vhosts/example.com/httpdocs
    
    SetEnv PP_CUSTOM_PHP_INI /var/www/vhosts/example.com/etc/php.ini
    
    <Directory /var/www/vhosts/example.com/httpdocs>
    
    	<IfModule mod_perl.c>
    	    <Files ~ (\.pl$)>
    		SetHandler perl-script
    		PerlHandler ModPerl::Registry
    		Options ExecCGI
    		allow from all
    		PerlSendHeader On
    	    </Files>
    	</IfModule>
    	<IfModule mod_python.c>
    	    <Files ~ (\.py$)>
    		SetHandler python-program
    		PythonHandler mod_python.cgihandler
    	    </Files>
    	</IfModule>
    	<IfModule mod_fcgid.c>
    	    <Files ~ (\.fcgi)>
    		SetHandler fcgid-script
    		Options +FollowSymLinks +ExecCGI
    	    </Files>
    	</IfModule>
    	<IfModule mod_fcgid.c>
    	    <Files ~ (\.php)>
    		SetHandler fcgid-script
    		FCGIWrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper .php
    		Options +ExecCGI
    		allow from all
    	    </Files>
    	</IfModule>
    
    	Options -Includes +ExecCGI
    
    </Directory>
    
     
  3. NicholasEvans

    NicholasEvans New Pleskian

    10
    35%
    Joined:
    Dec 17, 2012
    Messages:
    6
    Likes Received:
    0
    Sorry it doesn't show the default apache page. Instead I get:

    Code:
    No input file specified.
    
     
  4. NicholasEvans

    NicholasEvans New Pleskian

    10
    35%
    Joined:
    Dec 17, 2012
    Messages:
    6
    Likes Received:
    0
    Gave up in the end and used mod_php5.
     
Loading...