Здравствуйте, делаю разделение двух хостов, в файле httpd-vhosts.conf апача прописал:
Цитата |
<VirtualHost *:80> DocumentRoot "E:\xampp\htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@site.local DocumentRoot "E:\my_projects\site.local\www" ServerName site.local ServerAlias www.site.local php_admin_value open_basedir "E:\my_projects\site.local\www\site1" ErrorLog "E:\my_projects\site.local\logs\error.log" CustomLog "E:\my_projects\site.local\logs\access.log" combined <Directory "E:\my_projects\site.local\www"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@site.local DocumentRoot "E:\my_projects\site.local\www" ServerName site.local ServerAlias www.site.local php_admin_value open_basedir "E:\my_projects\site.local\www\site2" ErrorLog "E:\my_projects\site.local\logs\error.log" CustomLog "E:\my_projects\site.local\logs\access.log" combined <Directory "E:\my_projects\site.local\www"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> |
Цитата |
Warning: Unknown: open_basedir restriction in effect. File(E:\my_projects\site.local\www\site1\page1.htm) is not within the allowed path(s): (E:\my_projects\site.local\www\site1) in Unknown on line 0 Warning: Unknown: failed to open stream: Operation not permitted in Unknown on line 0 Fatal error: Unknown: Failed opening required 'E:/my_projects/site.local/www/site2/page1.htm' (include_path='.;E:\xampp\php\PEAR') in Unknown on line 0 |
Цитата |
php_admin_value open_basedir "E:\my_projects\site.local\www\site1" |
Цитата |
php_admin_value open_basedir "E:\my_projects\site.local\www\" |
Цитата |
<VirtualHost *:80> ServerAdmin webmaster@site.local DocumentRoot "E:\my_projects\site.local\www" ServerName site.local ServerAlias www.site.local php_admin_value open_basedir "E:\my_projects\site.local\www\" ErrorLog "E:\my_projects\site.local\logs\error.log" CustomLog "E:\my_projects\site.local\logs\access.log" combined <Directory "E:\my_projects\site.local\www"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> |
Цитата |
NameVirtualHost *:80 <VirtualHost *:80> DocumentRoot "E:\xampp\htdocs" ServerName localhost </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@blog.local DocumentRoot "E:\my_projects\blog.local\www" ServerName blog.local ServerAlias www.blog.local php_admin_value open_basedir "E:\my_projects\blog.local\www\" ErrorLog "E:\my_projects\blog.local\logs\error.log" CustomLog "E:\my_projects\blog.local\logs\access.log" combined <Directory "E:\my_projects\blog.local\www"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> <VirtualHost *:80> ServerAdmin webmaster@site.local DocumentRoot "E:\my_projects\site.local\www" ServerName site.local ServerAlias www.site.local php_admin_value open_basedir "E:\my_projects\site.local\www\" ErrorLog "E:\my_projects\site.local\logs\error.log" CustomLog "E:\my_projects\site.local\logs\access.log" combined <Directory "E:\my_projects\site.local\www"> AllowOverride All Order allow,deny Allow from all </Directory> </VirtualHost> |
Цитата |
127.0.0.1 blog.local 127.0.0.1 www.blog.local |