Hello i want to ask how to setup apache in way that I will get on each vhost documentroot = "/" and separate php.ini.
i have this kind of folder structure:
root/
domain1/
php.files ect
domain2/
php.files ect
i want to get in each php file in domain1 & domain2 $_SERVER['DOCUMENTROOT'] = "/" and have ability to set individual php.ini which will override main php.ini directives.
I tried many things to set this documentroot but still have no idea how to make it work. I tried also with suPhp in order to handle php.ini but it seems to not meet my needs, or I dont know how to configure it.
you need to edit 2 files 1- file is vhosts :
Domain : example domain files : C:\xampp\htdocs\example
<VirtualHost example>
ServerAdmin ssc@ssc.com
DocumentRoot C:\xampp\htdocs\example
ServerName example
ErrorLog logs/ssc-host.example.com-error_log
CustomLog logs/ssc-host.example.com-access_log common
</VirtualHost>
2- Also if you using windows you need to edit hosts file :
C:\Windows\System32\drivers\etc\hosts
Add this line
127.0.0.1 example
3- Restart your Apache server
4- write example in your browser
and now you have your domain .