Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Create vhost conf

Tags:

apache

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.

like image 747
Androidewbie Avatar asked Nov 13 '22 16:11

Androidewbie


1 Answers

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

like image 173
Aleksandar Jakovljevic Avatar answered Feb 01 '23 09:02

Aleksandar Jakovljevic