Note that there are some explanatory texts on larger screens.

plurals
  1. POConfiguring Apache vhost: sites having inner sites. possible?
    primarykey
    data
    text
    <p>i am wondering if i am doing some thing wrong</p> <p>i have <code>http://localhost</code> pointing to the directory <code>D:\Projects\Websites</code></p> <p>then i want to create a inner site <code>http://learningzf</code> in <code>D:\Projects\Websites\php\ZendFramework\LearningZF\public</code>. this is so that i can use URL's like <code>/users/login</code> instead of specifying the full url</p> <p>i find that if i add the entry in <code>vhosts</code> to point <code>http://learningzf</code> to <code>D:\Projects\Websites\php\ZendFramework\LearningZF\public</code>, localhost will also point to <code>D:\Projects\Websites\php\ZendFramework\LearningZF\public</code></p> <pre><code>&lt;VirtualHost *:80&gt; DocumentRoot "D:/Projects/Websites/php/ZendFramework/LearningZF/public" ServerName localhost &lt;/VirtualHost&gt; &lt;Directory "D:/Projects/Websites/php/ZendFramework/LearningZF/public"&gt; AllowOverride All Options All Order allow,deny Allow from 127.0.0.1 &lt;/Directory&gt; &lt;VirtualHost *:80&gt; DocumentRoot "D:/Projects/Websites" ServerName localhost &lt;/VirtualHost&gt; &lt;Directory "D:/Projects/Websites"&gt; AllowOverride All Options All Order allow,deny Allow from 127.0.0.1 &lt;/Directory&gt; </code></pre> <p>i noticed if i move the entries for <code>learningzf</code> below <code>localhost</code>, both <code>learningzf</code> &amp;<code>localhost</code> will point to <code>D:/Projects/Websites</code></p> <p><strong>UPDATE</strong></p> <p>following <a href="https://stackoverflow.com/questions/3266218/configuring-apache-vhost-sites-having-inner-sites-possible/3266508#3266508">@KikoV answer</a>, i have modified it to make it work ...</p> <pre><code>NameVirtualHost 127.0.0.1:80 &lt;VirtualHost localhost:80&gt; ServerName localhost DocumentRoot "D:/Projects/Websites" &lt;Directory "D:/Projects/Websites"&gt; AllowOverride All Options All Order allow,deny Allow from 127.0.0.1 &lt;/Directory&gt; &lt;/VirtualHost&gt; &lt;VirtualHost learningzf:80&gt; ServerName learningzf DocumentRoot "D:/Projects/Websites/php/ZendFramework/LearningZF/public" &lt;Directory "D:/Projects/Websites/php/ZendFramework/LearningZF/public"&gt; AllowOverride All Options All Order allow,deny Allow from 127.0.0.1 &lt;/Directory&gt; &lt;/VirtualHost&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload