How to make it so that you do not edit httpd.conf+hosts each time, and so that virtual hosts are automatically created (as in Denwer, for example)? System WinXP Home .

п.с. its build apache+php+mysql .

Just do not have links to the creation of virtual hosts for Linux .

After editing httpd.conf , in particular, adding this setting here:

 785: <IfModule mod_rewrite.c>786: RewriteEngine on787: RewriteBase /788: # Your rewrite rules go next789: </IfModule> 

Apache stopped running, the startup error says:

 C:\LocalS\apache\bin>httpd -wSyntax error on line 787 of C:/LocalS/apache/conf/httpd.conf:RewriteBase: only valid in per-directory config filesNote the errors or messages above, and press the <ESC> key to exit. 0....C:\LocalS\apache\bin> 

Connection Settings:

Screen of the current Connection Settings

Обновился : with the 1st problem everything was solved this way:

 <Directory c:/LocalS/sites/home> Options Indexes FollowSymLinks AllowOverride All Order deny,allow Allow from all<IfModule mod_rewrite.c> RewriteEngine on RewriteBase / # Your rewrite rules go next</IfModule></Directory> 

Now apache at least started, I still don’t understand how to automatically create a virtual host, in particular, where to register in the connection settings 127.0.0.1 ?

Update : Does not go to (lok.) Sites, errors in apache logs are as follows:

 [Sat Feb 09 16:59:35 2013] [warn] VirtualHost kohana.loc:80 overlaps with VirtualHost kohana.orm:80, the first has precedence, perhaps you need a NameVirtualHost directive[Sat Feb 09 16:59:35 2013] [warn] VirtualHost test.loc:80 overlaps with VirtualHost kohana.loc:80, the first has precedence, perhaps you need a NameVirtualHost directive[Sat Feb 09 16:59:35 2013] [warn] NameVirtualHost *:80 has no VirtualHosts[Sat Feb 09 16:59:35 2013] [notice] Child 1956: Child process is running[Sat Feb 09 16:59:35 2013] [notice] Child 1956: Acquired the start mutex.[Sat Feb 09 16:59:35 2013] [notice] Child 1956: Starting 64 worker threads.[Sat Feb 09 16:59:35 2013] [notice] Child 1956: Starting thread to listen on port 80. 

Обновление : Delivered to all existing Virtual hosts *:80 :

for example

 #kohana<VirtualHost *:80>ServerAdmin tolbasa@gmail.comServerName kohana.locDocumentRoot "C:/LocalS/sites/home/kohana.loc/www"ScriptAlias /cgi/ "C:/LocalS/Sites/home/kohana.loc/cgi/"ErrorLog C:/LocalS/sites/home/kohana.loc/error.logCustomLog C:/LocalS/sites/home/kohana.loc/access.log common</VirtualHost> 

Alas, again I can not get to the site, now the error in the logs of the site itself:

 [Sat Feb 09 17:57:10 2013] [error] [client 127.0.0.1] File does not exist: C:/LocalS/sites/home/_ 

What now?

  • So, and now after all these manipulations, my apace starts, but local sites do not start. - CapK
  • I did everything as stated in the article, a bunch of errors appeared. - CapK
  • Well, no one knows what now? What could I have done wrong? - CapK
  • All right, everything, understood. Without *.local was. - CapK

1 answer 1

Here's a similar * article only about Windows: Automating the creation of virtual hosts

  • I have a local server. - CapK
  • there it is vaguely written where exactly in the Acrylic config to register the DNS : codepaste.ru/13495 , where exactly to register 8.8.8.8 ? - CapK
  • and sorry, if I change my provider's DNS to 127.0.0.1 in a Wi-Fi router, my инет will not work. - CapK
  • The router does not need to change anything. If you have a router, then specify 127.0.0.1 in the properties of your WiFi connection (or wired, if they are connected to the router). You don’t need to change anything in the Acrylic settings - there is already a DNS server registered here for this project. you want to change - look for the string PrimaryServerAddress= and write down your provider's DNS address or router address. - mantigatos
  • where exactly to specify? I am attaching a screenshot of the Wi-Fi connection settings, if I change something here, then the connection will go off. - CapK