简体   繁体   中英

Create vhost conf

I want to configure a vhost for php so that my open base dir restriciton is overwritten but it does not use my vhost.conf.

My php.ini always shows open_basedir /var/www/vhosts/domain/httpdocs/:/tmp/ |||| no value last value is global but local has a value. I want to overwrite this with the following vhost.conf which is lying under /var/www/vhosts/domain/conf

<Directory /srv/www/vhosts/domain/httpdocs>
AllowOverride All
php_admin_value open_basedir none
</Directory>

Its not a subdomain.

ls -al
-rwxrwxrwx  1 root psaserv   295 2011-09-30 19:43 vhost.conf

Steps to reproduce:

login as root
cd /var/www/vhosts/domain/conf
touch vhost.conf
added content
/usr/local/psa/admin/sbin/websrvmng --reconfigure-vhost --vhost-name=domain
/etc/init.d/apache2 restart 

no change :(

I am using ubuntu with plesk.

Did you include your new conf file in httd.conf?

Try adding this line to the end of httpd.conf:

Include /var/www/vhosts/domain/conf/vhost.conf

and then restart apache

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM