Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here is a chapter of an e-book that explains how to create Virtual Hosts to do precisely what you want -- and the examples are using Ubuntu : <a href="http://www.survivethedeepend.com/zendframeworkbook/en/1.0/creating.a.local.domain.using.apache.virtual.hosts" rel="noreferrer">Creating A Local Domain Using Apache Virtual Hosts</a></p> <p>In a few words :</p> <ul> <li>You first need to create the VirtualHost</li> <li>Then, you have to edit your hosts file (under Linux, it's <code>/etc/hosts</code>) so the new "pseudo domain name" points to your machine.</li> </ul> <p>For the VirtualHost, with Ubuntu, you'd create a new file in <code>/etc/apache2/sites-available/</code> ; for instance named <code>your-site.com</code> ; it would contain something like this :</p> <pre><code>&lt;VirtualHost *:80&gt; ServerName your-site.com DocumentRoot /.../www/... &lt;Directory /.../www/...&gt; Options Indexes FollowSymLinks Includes AllowOverride All Order allow,deny Allow from all &lt;/Directory&gt; &lt;/VirtualHost&gt; </code></pre> <p>And you register this file so it's loaded by Apache, with this command :</p> <pre><code>sudo a2ensite your-site.com </code></pre> <p>And, then, reload Apache :</p> <pre><code>sudo /etc/init.d/apache2 reload </code></pre> <p><br> You then have to edit /etc/hosts to add a line like this :</p> <pre><code>127.0.0.1 your-site.com </code></pre> <p>So "your-site.com" actually points to your own computer.</p> <p><br> What is important is that the name used to access your website in a browser is the one that is declared in the hosts file ; it also must be the same than the one used by the ServerName directivr in Apache's configuration.</p> <p><br> When you have done that for one VirtualHost... It's just the same for every other one : only the name of the site, and it's DocumentRoot, change.</p> <p><br> Hope this helps!</p>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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